Package net.minecraft.client.gui.hud
Class SpectatorHud
java.lang.Object
net.minecraft.client.gui.DrawableHelper
net.minecraft.client.gui.hud.SpectatorHud
- All Implemented Interfaces:
SpectatorMenuCloseCallback
@Environment(CLIENT) public class SpectatorHud extends DrawableHelper implements SpectatorMenuCloseCallback
-
Field Summary
Fields Modifier and Type Field Description private MinecraftClientclientprivate longlastInteractionTimestatic IdentifierSPECTATOR_TEXTUREprivate SpectatorMenuspectatorMenuprivate static IdentifierWIDGETS_TEXTUREFields inherited from class net.minecraft.client.gui.DrawableHelper
GUI_ICONS_TEXTURE, OPTIONS_BACKGROUND_TEXTURE, STATS_ICON_TEXTURE -
Constructor Summary
Constructors Constructor Description SpectatorHud(MinecraftClient client) -
Method Summary
Modifier and Type Method Description voidclose(SpectatorMenu menu)voidcycleSlot(double offset)private floatgetSpectatorMenuHeight()booleanisOpen()voidrender(MatrixStack matrices)voidrender(MatrixStack matrices, float float2)private voidrenderSpectatorCommand(MatrixStack matrices, int int2, int int3, float float2, float float3, SpectatorMenuCommand spectatorMenuCommand)protected voidrenderSpectatorMenu(MatrixStack matrices, float float2, int int2, int int3, SpectatorMenuState spectatorMenuState)voidselectSlot(int slot)voiduseSelectedCommand()Methods inherited from class net.minecraft.client.gui.DrawableHelper
drawCenteredText, drawCenteredText, drawHorizontalLine, drawSprite, drawStringWithShadow, drawTexture, drawTexture, drawTexture, drawTexture, drawTextWithShadow, drawVerticalLine, fill, fillGradient, fillGradient, getZOffset, method_29343, setZOffset
-
Field Details
-
WIDGETS_TEXTURE
-
SPECTATOR_TEXTURE
-
client
-
lastInteractionTime
private long lastInteractionTime -
spectatorMenu
-
-
Constructor Details
-
SpectatorHud
-
-
Method Details
-
selectSlot
public void selectSlot(int slot) -
getSpectatorMenuHeight
private float getSpectatorMenuHeight() -
render
-
renderSpectatorMenu
protected void renderSpectatorMenu(MatrixStack matrices, float float2, int int2, int int3, SpectatorMenuState spectatorMenuState) -
renderSpectatorCommand
private void renderSpectatorCommand(MatrixStack matrices, int int2, int int3, float float2, float float3, SpectatorMenuCommand spectatorMenuCommand) -
render
-
close
- Specified by:
closein interfaceSpectatorMenuCloseCallback
-
isOpen
public boolean isOpen() -
cycleSlot
public void cycleSlot(double offset) -
useSelectedCommand
public void useSelectedCommand()
-