Package org.rspeer.game.adapter.type
Interface Interactable
-
- All Superinterfaces:
Actionable
- All Known Implementing Classes:
EffectObject
,Entity
,InterfaceComponent
,Item
,Npc
,PathingEntity
,Pickable
,Player
,Projectile
,SceneObject
public interface Interactable extends Actionable
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.rspeer.game.adapter.type.Actionable
Actionable.Query<Q extends Actionable.Query<Q>>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description MenuAction
actionOf(String action)
default MenuAction
actionOf(Predicate<String> predicate)
default boolean
interact(String action)
default boolean
interact(String... actions)
Iterates through @actions and returns true if the interaction was successfuldefault boolean
interact(String action, InterfaceAddress... dialog)
default boolean
interact(Predicate<String> predicate)
default boolean
interact(Predicate<String> action, InterfaceAddress... dialog)
-
Methods inherited from interface org.rspeer.game.adapter.type.Actionable
containsAction, containsAction, getActions, getRawActions
-
-
-
-
Method Detail
-
interact
default boolean interact(String... actions)
Iterates through @actions and returns true if the interaction was successful- Parameters:
actions
- The actions to check- Returns:
true
if the interaction was successful
-
interact
default boolean interact(Predicate<String> action, InterfaceAddress... dialog)
- Parameters:
action
- The interact optiondialog
- The dialog options to process after the interaction, in the same tick. Note: This requires the entity to be within 1 manhattan tile- Returns:
true
if successful
-
interact
default boolean interact(String action, InterfaceAddress... dialog)
- Parameters:
action
- The interact optiondialog
- The dialog options to process after the interaction, in the same tick. Note: This requires the entity to be within 1 manhattan tile- Returns:
true
if successful
-
interact
default boolean interact(String action)
- Parameters:
action
- The action to interact with- Returns:
true
if the interaction was successful
-
actionOf
MenuAction actionOf(String action)
-
actionOf
default MenuAction actionOf(Predicate<String> predicate)
-
-