java.lang.Object
net.botwithus.rs3.game.scene.entities.Entity
net.botwithus.rs3.game.scene.entities.item.GroundItem
All Implemented Interfaces:
Identifiable, Interactable<GroundItemAction>, Onymous, Validatable, Locatable

public final class GroundItem extends Entity implements Interactable<GroundItemAction>, Onymous
  • Constructor Details

  • Method Details

    • getStackSize

      public int getStackSize()
    • getConfigType

      @Nullable public @Nullable ItemType getConfigType()
    • getName

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

      public boolean interact(GroundItemAction type)
      Description copied from interface: Interactable
      Performs an action based on the given type.
      Specified by:
      interact in interface Interactable<GroundItemAction>
      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<GroundItemAction>
    • interact

      public boolean interact(String option, BiFunction<String,CharSequence,Boolean> spred, Function<Integer,GroundItemAction> typeMapper)
      Description copied from interface: Interactable
      Executes an action based on the given option.
      Specified by:
      interact in interface Interactable<GroundItemAction>
      Parameters:
      option - the option to be checked
      spred - a BiFunction that takes a String and a CharSequence and returns a boolean
      typeMapper - a Function that takes an Integer and returns a generic type
      Returns:
      a boolean indicating whether the action was successful
    • 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<GroundItemAction>
      Returns:
      a list of strings containing the options
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Entity
    • 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