Interface ClientScreenInputEvent.MouseClicked

Enclosing interface:
ClientScreenInputEvent

public static interface ClientScreenInputEvent.MouseClicked
  • Method Summary

    Modifier and Type
    Method
    Description
    mouseClicked(net.minecraft.client.Minecraft client, net.minecraft.client.gui.screens.Screen screen, double mouseX, double mouseY, int button)
    Invoked whenever a mouse click is performed.
  • Method Details

    • mouseClicked

      EventResult mouseClicked(net.minecraft.client.Minecraft client, net.minecraft.client.gui.screens.Screen screen, double mouseX, double mouseY, int button)
      Invoked whenever a mouse click is performed. A click consists of the press and release of a mouse button. Equivalent to Forge's GuiScreenEvent.MouseClickedEvent event.

      This event is handled in two phases PRE and POST, which are invoked before and after the keys have been processed by the screen, respectively.

      Parameters:
      client - The Minecraft instance performing it.
      screen - The screen this keystroke was performed in.
      mouseX - The scaled x-coordinate of the mouse cursor.
      mouseY - The scaled y-coordinate of the mouse cursor.
      button - The clicked mouse button.
      Returns:
      A EventResult determining the outcome of the event, the execution of the vanilla clicking mechanism may be cancelled by the result.