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
-
Nested Class Summary
Nested classes/interfaces inherited from class net.botwithus.rs3.game.scene.entities.Entity
Entity.Type -
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionGroundItem(int id, Coordinate coordinate, int stackSize, ScenePosition scene) -
Method Summary
Modifier and TypeMethodDescriptionboolean@Nullable ItemType@Nullable StringgetName()Gets the options available for this InteractableintinthashCode()booleanbooleaninteract(String option, BiFunction<String, CharSequence, Boolean> spred, Function<Integer, GroundItemAction> typeMapper) Executes an action based on the given option.booleaninteract(GroundItemAction type) Performs an action based on the given type.booleanvalidate()Gets whether the object is valid There can be many reasons aValidatablemay not be valid.Methods inherited from class net.botwithus.rs3.game.scene.entities.Entity
getArea, getCoordinate, getId, getScene, getTypeMethods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.botwithus.rs3.game.annotations.Interactable
getDefaultMapper, interact, interactMethods inherited from interface net.botwithus.rs3.game.Locatable
distanceTo, isReachable
-
Constructor Details
-
GroundItem
-
-
Method Details
-
getStackSize
public int getStackSize() -
getConfigType
-
getName
-
interact
- Specified by:
interactin interfaceInteractable<GroundItemAction>
-
interact
public boolean interact(String option, BiFunction<String, CharSequence, Boolean> spred, Function<Integer, GroundItemAction> typeMapper) Description copied from interface:InteractableExecutes an action based on the given option.- Specified by:
interactin interfaceInteractable<GroundItemAction>- Parameters:
option- the option to be checkedspred- a BiFunction that takes a String and a CharSequence and returns a booleantypeMapper- a Function that takes an Integer and returns a generic type- Returns:
- a boolean indicating whether the action was successful
-
getOptions
Description copied from interface:InteractableGets the options available for this Interactable- Specified by:
getOptionsin interfaceInteractable<GroundItemAction>- Returns:
- a list of strings containing the options
-
equals
-
hashCode
public int hashCode() -
validate
public boolean validate()Description copied from interface:ValidatableGets whether the object is valid There can be many reasons aValidatablemay 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:
validatein interfaceValidatable- Returns:
- true if the object passes validation, otherwise false
-