Class ScreenEvent.MouseInput

java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.client.event.ScreenEvent
net.neoforged.neoforge.client.event.ScreenEvent.MouseInput
Direct Known Subclasses:
ScreenEvent.MouseButtonPressed, ScreenEvent.MouseButtonReleased, ScreenEvent.MouseDragged, ScreenEvent.MouseScrolled
Enclosing class:
ScreenEvent

private abstract static class ScreenEvent.MouseInput extends ScreenEvent
Fired whenever an action is performed by the mouse. See the various subclasses to listen for different actions.
See Also:
  • Field Details Link icon

    • mouseX Link icon

      private final double mouseX
    • mouseY Link icon

      private final double mouseY
  • Constructor Details Link icon

    • MouseInput Link icon

      @Internal protected MouseInput(Screen screen, double mouseX, double mouseY)
  • Method Details Link icon

    • getMouseX Link icon

      public double getMouseX()
      Returns the X position of the mouse cursor, relative to the screen.
      Returns:
      the X position of the mouse cursor, relative to the screen
    • getMouseY Link icon

      public double getMouseY()
      Returns the Y position of the mouse cursor, relative to the screen.
      Returns:
      the Y position of the mouse cursor, relative to the screen