Class ScreenMouseEvents

java.lang.Object
net.fabricmc.fabric.api.client.screen.v1.ScreenMouseEvents

@Environment(CLIENT) public final class ScreenMouseEvents extends Object
Events related to use of the mouse in a Screen.

All of these events work on top of a specific screen instance. Subscriptions will only last as long as the screen itself, they'll disappear once the screen gets refreshed, closed or replaced. Use ScreenEvents.BEFORE_INIT to register the desired events every time it is necessary.

Events are fired in the following order:

AllowX -> BeforeX -> AfterX
If the result of the Allow event is false, then Before and After are not called.
See Also:
  • Method Details