Class InputEvent.MouseButton

java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.client.event.InputEvent
net.minecraftforge.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:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static 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.minecraftforge.client.event.InputEvent

    InputEvent.InteractionKeyMappingTriggered, InputEvent.Key, InputEvent.MouseButton, InputEvent.MouseScrollingEvent

    Nested classes/interfaces inherited from class net.minecraftforge.eventbus.api.Event

    net.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final int
     
    private final int
     
    private final int
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    MouseButton(int button, int action, int modifiers)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns the mouse button's action.
    int
    Returns the mouse button's input code.
    int
    Returns a bit field representing the active modifier keys.

    Methods inherited from class net.minecraftforge.eventbus.api.Event

    getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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: