Class OSRSGameObject

    • Constructor Detail

      • OSRSGameObject

        public OSRSGameObject​(long uid,
                              @NonNull
                              @NonNull java.lang.String type,
                              int id,
                              @NonNull
                              @NonNull Coordinate position)
    • Method Detail

      • getAnimationId

        public int getAnimationId()
        Description copied from interface: Animable
        Gets the entities current animation id
        Specified by:
        getAnimationId in interface Animable
        Returns:
        the current animation id, or if unavailable -1
      • getModel

        public Model getModel()
        Description copied from interface: Modeled
        Gets the polygon-based model of the entity
        Specified by:
        getModel in interface Modeled
        Overrides:
        getModel in class OSRSEntity
        Returns:
        the entities model, otherwise the backup if set, if neither are available null
      • getSpecializedTypeIndicator

        public byte getSpecializedTypeIndicator()
        Description copied from interface: GameObject
        Also known as getObjectModelShape.

        0,1,2,3 = BoundaryObject 4,5,6,7,8 = WallObject 9,10,11,12,13,14,15,16,17,18,19,20,21 = PrimaryObject 22 = FloorDecoration

        10 is the most common object model shape/type (standard)
        Specified by:
        getSpecializedTypeIndicator in interface GameObject
        Returns:
      • getType

        public GameObject.Type getType()
        Description copied from interface: GameObject
        Gets the type of the object(e.g. WallObject, FloorDecoration, etc)
        Specified by:
        getType in interface GameObject
        Returns:
        A String representing the object type
      • getPosition

        @NonNull
        public @NonNull Coordinate getPosition​(Coordinate regionBase)
        Description copied from interface: LocatableEntity
        Gets the position using the region base as the coordinate to offset from. For optimization.
        Specified by:
        getPosition in interface LocatableEntity
        Parameters:
        regionBase - The Coordinate base of the loaded region
      • getHighPrecisionOrientation

        public int getHighPrecisionOrientation()
        Description copied from interface: Rotatable
        For internal usage only. Subject to removal without notice.
        Specified by:
        getHighPrecisionOrientation in interface Rotatable
      • getSpotAnimationIds

        @Deprecated
        public java.util.Set<java.lang.Integer> getSpotAnimationIds()
        Deprecated.
        Specified by:
        getSpotAnimationIds in interface GameObject
      • getOrientationAsAngle

        public int getOrientationAsAngle()
        Description copied from interface: Rotatable
        Gets the current orientation as an angle.
        Specified by:
        getOrientationAsAngle in interface Rotatable
      • isValid

        public boolean isValid()
        Description copied from interface: Validatable
        Verifies whether this entity is valid and still exists, typically on the world-graph
        Specified by:
        isValid in interface Validatable
        Overrides:
        isValid in class Entity
        Returns:
        true if it's still available, otherwise false