public class ChestplateLauncherClientHandler extends IArmorUpgradeClientHandler.SimpleToggleableHandler<ChestplateLauncherHandler>
IArmorUpgradeClientHandler.AbstractHandler<T extends IArmorUpgradeHandler<?>>, IArmorUpgradeClientHandler.SimpleToggleableHandler<T extends IArmorUpgradeHandler<?>>| Modifier and Type | Field and Description |
|---|---|
static int |
MAX_PROGRESS |
| Constructor and Description |
|---|
ChestplateLauncherClientHandler() |
| Modifier and Type | Method and Description |
|---|---|
IOptionPage |
getGuiOptionsPage(IGuiScreen screen)
When you have some configurable options for your upgrade handler, return a new instance of an
IOptionPage. |
java.util.Optional<net.minecraft.client.settings.KeyBinding> |
getTriggerKeyBinding()
Get the keybind used to trigger this upgrade's action, if any.
|
boolean |
isToggleable()
Is this upgrade toggleable, i.e.
|
void |
onTriggered(ICommonArmorHandler armorHandler)
Called when the registered triggered keybind (if any) is pressed.
|
void |
render2D(com.mojang.blaze3d.matrix.MatrixStack matrixStack,
float partialTicks,
boolean armorPieceHasPressure)
Called in the 2D render stage (via
RenderGameOverlayEvent.Post) |
void |
tickClient(ICommonArmorHandler armorHandler)
This method is called every client tick, and should be used to update clientside logic for armor upgrades.
|
render3D, resetgetCommonHandlerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetAnimatedStat, getInitialKeyBinding, getKeybindCategory, getSubKeybindCategory, getSubKeybinds, initConfig, onResolutionChanged, saveToConfig, setOverlayColorpublic static final int MAX_PROGRESS
public IOptionPage getGuiOptionsPage(IGuiScreen screen)
IArmorUpgradeClientHandlerIOptionPage.
When you do so, it will automatically get picked up by the armor GUI handler, and a button for the upgrade
will be displayed in the main armor GUI.getGuiOptionsPage in interface IArmorUpgradeClientHandler<ChestplateLauncherHandler>getGuiOptionsPage in class IArmorUpgradeClientHandler.SimpleToggleableHandler<ChestplateLauncherHandler>screen - an instance of the gui Screen objectpublic boolean isToggleable()
IArmorUpgradeClientHandlerpublic java.util.Optional<net.minecraft.client.settings.KeyBinding> getTriggerKeyBinding()
IArmorUpgradeClientHandlerpublic void onTriggered(ICommonArmorHandler armorHandler)
IArmorUpgradeClientHandlerarmorHandler - the client-side common armor handler object for the playerpublic void tickClient(ICommonArmorHandler armorHandler)
IArmorUpgradeClientHandlerIArmorUpgradeHandler.tick(ICommonArmorHandler, boolean), this method is only called for upgrades
which are actually enabled (or not toggleable).tickClient in interface IArmorUpgradeClientHandler<ChestplateLauncherHandler>tickClient in class IArmorUpgradeClientHandler.SimpleToggleableHandler<ChestplateLauncherHandler>armorHandler - common armor handler for the player wearing this armor piecepublic void render2D(com.mojang.blaze3d.matrix.MatrixStack matrixStack,
float partialTicks,
boolean armorPieceHasPressure)
IArmorUpgradeClientHandlerRenderGameOverlayEvent.Post)render2D in interface IArmorUpgradeClientHandler<ChestplateLauncherHandler>render2D in class IArmorUpgradeClientHandler.SimpleToggleableHandler<ChestplateLauncherHandler>matrixStack - the matrix stackpartialTicks - partial ticks since last world tickarmorPieceHasPressure - true if the armor piece actually has any pressure