java.lang.Object
net.botwithus.rs3.game.scene.entities.Entity
net.botwithus.rs3.game.scene.entities.object.SceneObject
All Implemented Interfaces:
Identifiable, Interactable<ObjectAction>, Onymous, Validatable, Locatable

public final class SceneObject extends Entity implements Interactable<ObjectAction>, Onymous
  • Constructor Details

    • SceneObject

      public SceneObject(int id, Entity.Type type, Coordinate coordinate, boolean isHidden, int locTypeId, int shape, int rotation, ScenePosition scene, int animationID)
  • Method Details

    • getAnimationID

      public int getAnimationID()
    • getName

      @Nullable public @Nullable String getName()
      Specified by:
      getName in interface Onymous
    • isHidden

      public boolean isHidden()
    • getOptions

      @NotNull public @NotNull List<String> getOptions()
      Description copied from interface: Interactable
      Gets the options available for this Interactable
      Specified by:
      getOptions in interface Interactable<ObjectAction>
      Returns:
      a list of strings containing the options
    • getConfigType

      @Nullable public @Nullable LocationType getConfigType()
    • interact

      public boolean interact(ObjectAction type)
      Description copied from interface: Interactable
      Performs an action based on the given type.
      Specified by:
      interact in interface Interactable<ObjectAction>
      Parameters:
      type - The type of action to perform.
      Returns:
      true if the action was successful, false otherwise.
    • interact

      public boolean interact(Integer typeId)
      Specified by:
      interact in interface Interactable<ObjectAction>
    • getDefaultMapper

      public Function<Integer,ObjectAction> getDefaultMapper()
      Description copied from interface: Interactable
      Returns a default Function that throws an UnsupportedOperationException when called.
      Specified by:
      getDefaultMapper in interface Interactable<ObjectAction>
      Returns:
      a default Function
    • getShape

      public int getShape()
      Gets the shape of the object.
      Returns:
      The shape of the object.
    • getRotation

      public int getRotation()
      Returns the rotation of the object.
      Returns:
      The rotation of the object.
    • validate

      public boolean validate()
      Description copied from interface: Validatable
      Gets whether the object is valid There can be many reasons a Validatable may not be valid. These can range from the entity has despawned, a component has closed, a coordinate is no longer in the scene, an animation sequence has ended, and many other reasons..
      Specified by:
      validate in interface Validatable
      Returns:
      true if the object passes validation, otherwise false
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Entity
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Entity