Package net.minecraftforge.client.event
Class GuiScreenEvent.InitGuiEvent
java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.client.event.GuiScreenEvent
net.minecraftforge.client.event.GuiScreenEvent.InitGuiEvent
- Direct Known Subclasses:
GuiScreenEvent.InitGuiEvent.Post
,GuiScreenEvent.InitGuiEvent.Pre
- Enclosing class:
- GuiScreenEvent
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
This event fires right afterScreen#init()
.static class
This event fires just after initializing theMinecraft
, font renderer, width, and height fields.
If canceled the following lines are skipped inScreen.init(Minecraft, int, int)
:
this.buttonList.clear();
this.children.clear();
this.initGui();
Nested classes/interfaces inherited from class net.minecraftforge.client.event.GuiScreenEvent
GuiScreenEvent.BackgroundDrawnEvent, GuiScreenEvent.DrawScreenEvent, GuiScreenEvent.InitGuiEvent, GuiScreenEvent.KeyboardCharTypedEvent, GuiScreenEvent.KeyboardKeyEvent, GuiScreenEvent.KeyboardKeyPressedEvent, GuiScreenEvent.KeyboardKeyReleasedEvent, GuiScreenEvent.MouseClickedEvent, GuiScreenEvent.MouseDragEvent, GuiScreenEvent.MouseInputEvent, GuiScreenEvent.MouseReleasedEvent, GuiScreenEvent.MouseScrollEvent, GuiScreenEvent.PotionShiftEvent
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
Modifier and TypeFieldDescriptionprivate Consumer<GuiEventListener>
private List<GuiEventListener>
private Consumer<GuiEventListener>
-
Constructor Summary
ConstructorDescriptionInitGuiEvent(Screen gui, List<GuiEventListener> list, Consumer<GuiEventListener> add, Consumer<GuiEventListener> remove)
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addWidget(GuiEventListener button)
Unmodifiable reference to the list of buttons on theGuiScreenEvent.gui
.void
removeWidget(GuiEventListener button)
Methods inherited from class net.minecraftforge.client.event.GuiScreenEvent
getGui
Methods inherited from class net.minecraftforge.eventbus.api.Event
getListenerList, getParentListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult, setup
-
Field Details
-
add
-
remove
-
list
-
-
Constructor Details
-
InitGuiEvent
public InitGuiEvent(Screen gui, List<GuiEventListener> list, Consumer<GuiEventListener> add, Consumer<GuiEventListener> remove)
-
-
Method Details
-
getWidgetList
Unmodifiable reference to the list of buttons on theGuiScreenEvent.gui
. -
addWidget
-
removeWidget
-