Package net.minecraftforge.client.event
Class ScreenEvent
java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.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.minecraftforge.eventbus.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
.Nested classes/interfaces inherited from class net.minecraftforge.eventbus.api.Event
net.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result
-
Field Summary
-
Constructor Summary
-
Method Summary
Methods inherited from class net.minecraftforge.eventbus.api.Event
getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult
-
Field Details
-
screen
-
-
Constructor Details
-
ScreenEvent
-
-
Method Details
-
getScreen
Returns the screen that caused this event.- Returns:
- the screen that caused this event
-