Class ScreenEvent
java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.client.event.ScreenEvent
- Direct Known Subclasses:
ScreenEvent.CharacterTyped, ScreenEvent.Closing, ScreenEvent.Init, ScreenEvent.KeyInput, ScreenEvent.MouseInput, ScreenEvent.Opening, ScreenEvent.Preedit, 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:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classFired when a keyboard key corresponding to a character is typed.static classFired before aScreenis closed.static classFired when a screen is being initialized.private static classFired whenever a keyboard key is pressed or released.static classFired when a keyboard key is pressed.static classFired when a keyboard key is released.static classFired when a mouse button is pressed.static classFired when a mouse button is released.static classFired when the mouse was dragged while a button is being held down.private static classFired whenever an action is performed by the mouse.static classFired when the mouse was dragged while a button is being held down.static classFired before anyScreenis opened, to allow changing it or preventing it from being opened.static classFired when an Input Method Editor (IME) preedit event is received by a screen.static classFired when a screen is being drawn.static classFired ahead of rendering any active mob effects in theEffectsInInventoryheld by aAbstractContainerScreen. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
screen
-
-
Constructor Details
-
ScreenEvent
-
-
Method Details
-
getScreen
Returns the screen that caused this event.- Returns:
- the screen that caused this event
-