public interface IOptionPage
IArmorUpgradeClientHandler.getGuiOptionsPage(IGuiScreen).
It is strongly recommended to extend the IOptionPage.SimpleOptionPage class rather than implement this interface directly.
| Modifier and Type | Interface and Description |
|---|---|
static class |
IOptionPage.SimpleOptionPage<T extends IArmorUpgradeClientHandler<?>>
Convenience class for simple armor features with no additional settings.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
displaySettingsHeader()
Should the "Settings" header be displayed?
|
IGuiScreen |
getGuiScreen()
Get a reference to the IGuiScreen object.
|
default java.util.Optional<IKeybindingButton> |
getKeybindingButton()
Get the keybinding button for this page, if any.
|
net.minecraft.util.text.IFormattableTextComponent |
getPageName()
This text is used in the GUI button for this page.
|
boolean |
isToggleable()
Can this upgrade be toggled off & on? If true, a checkbox (with the ability to bind a key) will be
automatically displayed in this upgrade's GUI.
|
boolean |
keyPressed(int keyCode,
int scanCode,
int modifiers)
Called by
Screen.keyPressed(int, int, int) when a key is pressed. |
boolean |
keyReleased(int keyCode,
int scanCode,
int modifiers)
Called by
INestedGuiEventHandler.keyReleased(int, int, int) when a key is released. |
boolean |
mouseClicked(double x,
double y,
int button)
Called when mouse is clicked via
INestedGuiEventHandler.mouseClicked(double, double, int) |
boolean |
mouseDragged(double mouseX,
double mouseY,
int button,
double dragX,
double dragY)
Called when the mouse is dragged across the GUI
|
boolean |
mouseScrolled(double x,
double y,
double dir)
Called when the mouse wheel is rolled.
|
void |
populateGui(IGuiScreen gui)
Here you can initialize your buttons and stuff like with a
Screen. |
void |
renderPost(com.mojang.blaze3d.matrix.MatrixStack matrixStack,
int x,
int y,
float partialTicks)
Called immediately after
Screen.render(MatrixStack, int, int, float)
Here you can render additional things like text. |
void |
renderPre(com.mojang.blaze3d.matrix.MatrixStack matrixStack,
int x,
int y,
float partialTicks)
Called immediately before
Screen.render(MatrixStack, int, int, float) |
default int |
settingsYposition()
Y position from the "Setting" header.
|
default void |
tick()
Called immediately after
Screen.tick() |
IGuiScreen getGuiScreen()
net.minecraft.util.text.IFormattableTextComponent getPageName()
void populateGui(IGuiScreen gui)
Screen.gui - the holding GUIvoid renderPre(com.mojang.blaze3d.matrix.MatrixStack matrixStack,
int x,
int y,
float partialTicks)
Screen.render(MatrixStack, int, int, float)matrixStack - the matrix stackx - mouse Xy - mouse YpartialTicks - partial ticks since last world ticksvoid renderPost(com.mojang.blaze3d.matrix.MatrixStack matrixStack,
int x,
int y,
float partialTicks)
Screen.render(MatrixStack, int, int, float)
Here you can render additional things like text.matrixStack - the matrix stackx - mouse Xy - mouse YpartialTicks - partial ticks since last world ticksboolean keyPressed(int keyCode,
int scanCode,
int modifiers)
Screen.keyPressed(int, int, int) when a key is pressed.keyCode - typed keycodescanCode - the scan code (rarely useful)modifiers - key modifiersboolean keyReleased(int keyCode,
int scanCode,
int modifiers)
INestedGuiEventHandler.keyReleased(int, int, int) when a key is released.keyCode - typed keycodescanCode - the scan code (rarely useful)modifiers - key modifiersboolean mouseClicked(double x,
double y,
int button)
INestedGuiEventHandler.mouseClicked(double, double, int)x - mouse Xy - mouse Ybutton - mouse buttonboolean mouseScrolled(double x,
double y,
double dir)
x - mouse Xy - mouse Ydir - scroll directionboolean mouseDragged(double mouseX,
double mouseY,
int button,
double dragX,
double dragY)
mouseX - mouse XmouseY - mouse Ybutton - mouse buttondragX - drag XdragY - drag Yboolean isToggleable()
boolean displaySettingsHeader()
default int settingsYposition()
default void tick()
Screen.tick()default java.util.Optional<IKeybindingButton> getKeybindingButton()
IPneumaticHelmetRegistry.makeKeybindingButton(int, KeyBinding).Optional.empty() if there isn't one