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

public abstract static class InputEvent.MouseButton extends 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:
  • 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: