Class GameObjectDefinition

    • Constructor Detail

      • GameObjectDefinition

        public GameObjectDefinition()
    • Method Detail

      • get

        @NonNull
        public static @NonNull java.util.List<GameObjectDefinition> get​(int first,
                                                                        int last)
        Gets a list of definitions within the range of [first, last]
      • get

        @NonNull
        public static @NonNull java.util.List<GameObjectDefinition> get​(int first,
                                                                        int last,
                                                                        java.util.function.Predicate<GameObjectDefinition> filter)
        Gets a list of definitions within the range of [first, last] that are accepted by the filter
      • get

        @Nullable
        public static @Nullable GameObjectDefinition get​(int id)
        Gets the definition for the object with the specified id
        Returns:
        The definition if available, otherwise null
      • loadAll

        @NonNull
        public static @NonNull java.util.List<GameObjectDefinition> loadAll()
        Loads all definitions
      • loadAll

        @NonNull
        public static @NonNull java.util.List<GameObjectDefinition> loadAll​(java.util.function.Predicate<GameObjectDefinition> filter)
        Loads all definitions that are accepted by the filter
      • getLocalState

        @Nullable
        public abstract @Nullable GameObjectDefinition getLocalState()
        Gets the GameObjectDefinition containing data for this objects current state (transformation). For example, in farming the patch id doesn't change when your player plants something in it, however it's local state does. This GameObjectDefinition contains information such as a plant specific id, the plants specific name, and the available powers.
        Returns:
        a GameObjectDefinition if the objects state changes locally, otherwise null
      • getTransformations

        @NonNull
        public abstract @NonNull java.util.Collection<GameObjectDefinition> getTransformations()
        Gets all the possible transformations for the given game object. Objects can transform based on various in game events such as activating a lodestone.
        Returns:
        a non-null Collection of all possible transformations.
      • getName

        @NonNull
        public abstract @NonNull java.lang.String getName()
        Specified by:
        getName in interface Onymous
      • getActions

        @NonNull
        public abstract @NonNull java.util.List<java.lang.String> getActions()
        Gets the powers that can be performed on the object
      • getRawActions

        public abstract java.lang.String[] getRawActions()
      • getAnimationIds

        @NonNull
        public abstract @NonNull java.util.List<java.lang.Integer> getAnimationIds()
        Gets a list of all possible animations that can be performed by this object
      • getAppearance

        @NonNull
        public abstract @NonNull java.util.List<java.lang.Integer> getAppearance()
        Gets a list of integers that are used to represent this entities appearance. Internally these are used to generate a GameObject's Model.
      • getClippingType

        public abstract int getClippingType()
        Gets the objects clipping type, used to calculate collisions
      • getWidth

        public abstract int getWidth()
        Gets the objects width (in tiles)
      • getHeight

        public abstract int getHeight()
        Gets the objects height (in tiles)
      • impassable

        public abstract boolean impassable()
        A flag that is used to determine whether or not certain objects can be walked on. Its main purpose is for path generation.
      • getAttribute

        @Nullable
        public abstract @Nullable Attribute getAttribute​(long id)
        Gets the attribute with the specified id
        Returns:
        the attribute if available, otherwise null
      • getAttributes

        public abstract java.util.List<Attribute> getAttributes()
        Gets a list of all of the objects attributes.
      • getColorSubstitutions

        public abstract java.util.Map<java.awt.Color,​java.awt.Color> getColorSubstitutions()
        Gets a mapping of colors that are to be substituted in the base model.
      • getMaterialSubstitutions

        public abstract java.util.Map<Material,​Material> getMaterialSubstitutions()
        Gets a mapping of materials that are to be substituted in the base model.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • getId

        public abstract int getId()
        Gets an identifier used to identify the object
        Specified by:
        getId in interface Identifiable
      • getMapFunction

        public abstract int getMapFunction()
        The circular icons that are displayed on the map and minimap as an indicator
      • getMapScene

        public abstract int getMapScene()
        Object icons that are rendered on the map and minimap such as trees, rocks, bushes, etc.
      • getModelTypes

        public abstract int[] getModelTypes()
      • impenetrable

        public abstract boolean impenetrable()
        Determines whether or not projectiles can bypass/go through the object to reach their targets
        Returns:
      • getModelXScale

        public abstract int getModelXScale()
      • getModelYScale

        public abstract int getModelYScale()
      • getModelZScale

        public abstract int getModelZScale()
      • getModelXTranslation

        public abstract int getModelXTranslation()
      • getModelYTranslation

        public abstract int getModelYTranslation()
      • getModelZTranslation

        public abstract int getModelZTranslation()
      • isModelMirrorable

        public abstract boolean isModelMirrorable()
      • isInteractable

        public abstract boolean isInteractable()
      • getStateVarp

        @Nullable
        public abstract @Nullable Varp getStateVarp()
        The Varp responsible for controlling the state (GameObjectDefinition) of the GameObject, if present.
      • getStateVarbit

        @Nullable
        public abstract @Nullable Varbit getStateVarbit()
        The Varbit responsible for controlling the state (GameObjectDefinition) of the GameObject, if present.