Enum Class MouseBehavior
- All Implemented Interfaces:
Serializable,Comparable<MouseBehavior>,Constable
When the interaction system needs to determine where to simulate a mouse click, this enum specifies the strategy used to calculate the click position. Different modes offer varying levels of realism and precision.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionClick on the entity's clickbox.Mouse behavior is disabled.Click at the current mouse position.Click off-screen or at an invalid position.Click at a random position. -
Method Summary
Modifier and TypeMethodDescriptionstatic MouseBehaviorReturns the enum constant of this class with the specified name.static MouseBehavior[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
CLICKBOXES
Click on the entity's clickbox.Calculates a click point within the visible clickbox of the target entity. This mode is the most realistic as it simulates clicking on the actual visible area of game objects, NPCs, or other entities.
-
OFF_SCREEN
Click off-screen or at an invalid position.Uses coordinates outside the game viewport. This can be used for interactions that should not visually affect the cursor position.
-
RANDOM
Click at a random position.Generates random click coordinates. This adds unpredictability to interaction patterns for varied behavior.
-
MOUSE_POS
Click at the current mouse position.Uses the current cursor position as the click point without any movement. Useful when the cursor is already positioned correctly.
-
DISABLED
Mouse behavior is disabled.No mouse position calculation is performed. The interaction will proceed without setting specific click coordinates.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-