Class ScreenEvent

java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.client.event.ScreenEvent
Direct Known Subclasses:
ScreenEvent.BackgroundRendered, ScreenEvent.CharacterTyped, ScreenEvent.Closing, ScreenEvent.Init, ScreenEvent.KeyInput, ScreenEvent.MouseInput, ScreenEvent.Opening, ScreenEvent.Render, ScreenEvent.RenderInventoryMobEffects

public abstract class ScreenEvent extends net.neoforged.bus.api.Event
Fired on different events/actions when a Screen is active and visible. See the various subclasses for listening to different events.

These events are fired on the main Forge event bus, only on the logical client.

See Also:
  • Field Details

    • screen

      private final Screen screen
  • Constructor Details

    • ScreenEvent

      @Internal protected ScreenEvent(Screen screen)
  • Method Details

    • getScreen

      public Screen getScreen()
      Returns the screen that caused this event.
      Returns:
      the screen that caused this event