Package net.minecraft.client.realms.gui
Class RealmsWorldSlotButton
java.lang.Object
net.minecraft.client.gui.DrawableHelper
net.minecraft.client.gui.widget.AbstractButtonWidget
net.minecraft.client.gui.widget.AbstractPressableButtonWidget
net.minecraft.client.gui.widget.ButtonWidget
net.minecraft.client.realms.gui.RealmsWorldSlotButton
- All Implemented Interfaces:
Drawable,Element,TickableElement
@Environment(CLIENT) public class RealmsWorldSlotButton extends ButtonWidget implements TickableElement
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classRealmsWorldSlotButton.Actionstatic classRealmsWorldSlotButton.StateNested classes/interfaces inherited from class net.minecraft.client.gui.widget.ButtonWidget
ButtonWidget.PressAction, ButtonWidget.TooltipSupplier -
Field Summary
Fields Modifier and Type Field Description private static TextACTIVE_TOOLTIPprivate intanimTickstatic IdentifierEMPTY_FRAMEprivate static TextMINIGAME_TOOLTIPstatic IdentifierPANORAMA_0static IdentifierPANORAMA_2static IdentifierPANORAMA_3private Supplier<RealmsServer>serverDataProviderstatic IdentifierSLOT_FRAMEprivate intslotIndexprivate RealmsWorldSlotButton.Statestateprivate static TextTOOLTIPprivate Consumer<Text>toolTipSetterFields inherited from class net.minecraft.client.gui.widget.ButtonWidget
EMPTY, onPress, tooltipSupplierFields inherited from class net.minecraft.client.gui.widget.AbstractButtonWidget
active, alpha, height, hovered, nextNarration, visible, WIDGETS_LOCATION, width, x, yFields inherited from class net.minecraft.client.gui.DrawableHelper
GUI_ICONS_TEXTURE, OPTIONS_BACKGROUND_TEXTURE, STATS_ICON_TEXTURE -
Constructor Summary
Constructors Constructor Description RealmsWorldSlotButton(int x, int y, int width, int height, Supplier<RealmsServer> serverDataProvider, Consumer<Text> toolTipSetter, int id, ButtonWidget.PressAction action) -
Method Summary
Modifier and Type Method Description private voiddrawSlotFrame(MatrixStack matrices, int x, int y, int mouseX, int mouseY, boolean bool, String text, int int2, long long2, String string, boolean bool2, boolean bool3, RealmsWorldSlotButton.Action action, Text text2)RealmsWorldSlotButton.StategetState()private com.mojang.datafixers.util.Pair<Text,Text>method_27454(RealmsServer realmsServer, String string, boolean bool, boolean bool2, RealmsWorldSlotButton.Action action)private static RealmsWorldSlotButton.Actionmethod_27455(RealmsServer realmsServer, boolean bool, boolean bool2)voidrenderButton(MatrixStack matrices, int mouseX, int mouseY, float delta)voidtick()Methods inherited from class net.minecraft.client.gui.widget.ButtonWidget
onPress, renderToolTipMethods inherited from class net.minecraft.client.gui.widget.AbstractPressableButtonWidget
keyPressed, onClickMethods inherited from class net.minecraft.client.gui.widget.AbstractButtonWidget
changeFocus, clicked, getHeight, getMessage, getNarrationMessage, getWidth, getYImage, isFocused, isHovered, isMouseOver, isValidClickButton, method_32602, mouseClicked, mouseDragged, mouseReleased, narrate, onDrag, onFocusedChanged, onRelease, playDownSound, queueNarration, render, renderBg, setAlpha, setFocused, setMessage, setWidthMethods inherited from class net.minecraft.client.gui.DrawableHelper
drawCenteredString, drawCenteredText, drawHorizontalLine, drawSprite, drawStringWithShadow, drawTexture, drawTexture, drawTexture, drawTexture, drawTextWithShadow, drawVerticalLine, fill, fillGradient, fillGradient, getZOffset, method_29343, method_33284, setZOffsetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.client.gui.Element
charTyped, keyReleased, mouseMoved, mouseScrolled
-
Field Details
-
SLOT_FRAME
-
EMPTY_FRAME
-
PANORAMA_0
-
PANORAMA_2
-
PANORAMA_3
-
ACTIVE_TOOLTIP
-
MINIGAME_TOOLTIP
-
TOOLTIP
-
serverDataProvider
-
toolTipSetter
-
slotIndex
private final int slotIndex -
animTick
private int animTick -
state
-
-
Constructor Details
-
RealmsWorldSlotButton
public RealmsWorldSlotButton(int x, int y, int width, int height, Supplier<RealmsServer> serverDataProvider, Consumer<Text> toolTipSetter, int id, ButtonWidget.PressAction action)
-
-
Method Details
-
getState
-
tick
public void tick()- Specified by:
tickin interfaceTickableElement
-
method_27455
private static RealmsWorldSlotButton.Action method_27455(RealmsServer realmsServer, boolean bool, boolean bool2) -
method_27454
private com.mojang.datafixers.util.Pair<Text,Text> method_27454(RealmsServer realmsServer, String string, boolean bool, boolean bool2, RealmsWorldSlotButton.Action action) -
renderButton
- Overrides:
renderButtonin classButtonWidget
-
drawSlotFrame
private void drawSlotFrame(MatrixStack matrices, int x, int y, int mouseX, int mouseY, boolean bool, String text, int int2, long long2, @Nullable String string, boolean bool2, boolean bool3, RealmsWorldSlotButton.Action action, @Nullable Text text2)
-