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:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Fired directly after the background of the screen is drawn.static class
Fired when a keyboard key corresponding to a character is typed.static class
Fired before aScreen
is closed.static class
Fired when a screen is being initialized.private static class
Fired whenever a keyboard key is pressed or released.static class
Fired when a keyboard key is pressed.static class
Fired when a keyboard key is released.static class
Fired when a mouse button is pressed.static class
Fired when a mouse button is released.static class
Fired when the mouse was dragged while a button is being held down.private static class
Fired whenever an action is performed by the mouse.static class
Fired when the mouse was dragged while a button is being held down.static class
Fired before anyScreen
is opened, to allow changing it or preventing it from being opened.static class
Fired when a screen is being drawn.static class
Fired ahead of rendering any active mob effects in theinventory screen
. -
Field Summary
-
Constructor Summary
-
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
-