Class InputEvent.MouseButton
java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.client.event.InputEvent
net.neoforged.neoforge.client.event.InputEvent.MouseButton
- Direct Known Subclasses:
InputEvent.MouseButton.Post
,InputEvent.MouseButton.Pre
- Enclosing class:
InputEvent
Fired when a mouse button is pressed/released. Sub-events get fired
before
and after
this happens.
These events are fired on the main Forge event bus, only on the logical client.
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Fired when a mouse button is pressed/released, after processing.static class
Fired when a mouse button is pressed/released, before being processed by vanilla.Nested classes/interfaces inherited from class net.neoforged.neoforge.client.event.InputEvent
InputEvent.InteractionKeyMappingTriggered, InputEvent.Key, InputEvent.MouseButton, InputEvent.MouseScrollingEvent
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
Returns the mouse button's action.int
Returns the mouse button's input code.int
Returns a bit field representing the active modifier keys.
-
Field Details
-
button
private final int button -
action
private final int action -
modifiers
private final int modifiers
-
-
Constructor Details
-
MouseButton
@Internal protected MouseButton(int button, int action, int modifiers)
-
-
Method Details
-
getButton
public int getButton()Returns the mouse button's input code.- Returns:
- the mouse button's input code
- See Also:
-
getAction
public int getAction()Returns the mouse button's action.- Returns:
- the mouse button's action
- See Also:
-
getModifiers
public int getModifiers()Returns a bit field representing the active modifier keys.- Returns:
- a bit field representing the active modifier keys
- See Also:
-