public static class GuiScreenEvent.InitGuiEvent extends GuiScreenEvent
Modifier and Type | Class and Description |
---|---|
static class |
GuiScreenEvent.InitGuiEvent.Post
This event fires right after
GuiScreen#initGui() . |
static class |
GuiScreenEvent.InitGuiEvent.Pre
This event fires just after initializing
GuiScreen#mc , GuiScreen#fontRenderer ,
GuiScreen#width , and GuiScreen#height .If canceled the following lines are skipped in GuiScreen#setWorldAndResolution(Minecraft, int, int) :this.buttonList.clear(); this.children.clear(); this.initGui(); |
GuiScreenEvent.ActionPerformedEvent, 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
Modifier and Type | Field and Description |
---|---|
private java.util.function.Consumer<Widget> |
add |
private java.util.List<Widget> |
list |
private java.util.function.Consumer<Widget> |
remove |
Constructor and Description |
---|
InitGuiEvent(Screen gui,
java.util.List<Widget> list,
java.util.function.Consumer<Widget> add,
java.util.function.Consumer<Widget> remove) |
Modifier and Type | Method and Description |
---|---|
void |
addWidget(Widget button) |
java.util.List<Widget> |
getWidgetList()
Unmodifiable reference to the list of buttons on the
GuiScreenEvent.gui . |
void |
removeWidget(Widget button) |
getGui
private java.util.function.Consumer<Widget> add
private java.util.function.Consumer<Widget> remove
private java.util.List<Widget> list
public java.util.List<Widget> getWidgetList()
GuiScreenEvent.gui
.public void addWidget(Widget button)
public void removeWidget(Widget button)