类 ScreenEvent.Opening
java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.client.event.ScreenEvent
net.minecraftforge.client.event.ScreenEvent.Opening
- 封闭类:
ScreenEvent
Fired before any
Screen
is opened, to allow changing it or preventing it from being opened.
All screen layers on the screen are closed before this event is fired.
This event is cancellable, and does not have a result.
If this event is cancelled, then the Screen
shall be prevented from opening and any previous screen
will remain open. However, cancelling this event will not prevent the closing of screen layers which happened before
this event fired.
This event is fired on the main Forge event bus, only on the logical client.
-
嵌套类概要
从类继承的嵌套类/接口 net.minecraftforge.client.event.ScreenEvent
ScreenEvent.BackgroundRendered, ScreenEvent.CharacterTyped, ScreenEvent.Closing, ScreenEvent.Init, ScreenEvent.KeyPressed, ScreenEvent.KeyReleased, ScreenEvent.MouseButtonPressed, ScreenEvent.MouseButtonReleased, ScreenEvent.MouseDragged, ScreenEvent.MouseScrolled, ScreenEvent.Opening, ScreenEvent.Render, ScreenEvent.RenderInventoryMobEffects
从类继承的嵌套类/接口 net.minecraftforge.eventbus.api.Event
net.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result
-
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明@Nullable Screen
Gets the currently open screen at the time of the event being fired.@Nullable Screen
void
setNewScreen
(Screen newScreen) Sets the new screen to be opened if the event is not cancelled.从类继承的方法 net.minecraftforge.client.event.ScreenEvent
getScreen
从类继承的方法 net.minecraftforge.eventbus.api.Event
getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult
-
字段详细资料
-
currentScreen
-
newScreen
-
-
构造器详细资料
-
Opening
-
-
方法详细资料
-
getCurrentScreen
Gets the currently open screen at the time of the event being fired.May be null if no screen was open.
-
getNewScreen
- 返回:
- The screen that will be opened if the event is not cancelled. May be null.
-
setNewScreen
Sets the new screen to be opened if the event is not cancelled. May be null.
-