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 class
RealmsWorldSlotButton.Action
static class
RealmsWorldSlotButton.State
Nested classes/interfaces inherited from class net.minecraft.client.gui.widget.ButtonWidget
ButtonWidget.PressAction, ButtonWidget.TooltipSupplier
-
Field Summary
Fields Modifier and Type Field Description private int
animTick
static Identifier
EMPTY_FRAME
private static Text
field_26468
private static Text
field_26469
private static Text
field_26470
static Identifier
PANORAMA_0
static Identifier
PANORAMA_2
static Identifier
PANORAMA_3
private Supplier<RealmsServer>
serverDataProvider
static Identifier
SLOT_FRAME
private int
slotIndex
private RealmsWorldSlotButton.State
state
private Consumer<Text>
toolTipSetter
Fields inherited from class net.minecraft.client.gui.widget.ButtonWidget
EMPTY, onPress, tooltipSupplier
Fields inherited from class net.minecraft.client.gui.widget.AbstractButtonWidget
active, alpha, height, hovered, nextNarration, visible, WIDGETS_LOCATION, width, x, y
Fields 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 void
drawSlotFrame(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.State
getState()
private com.mojang.datafixers.util.Pair<Text,Text>
method_27454(RealmsServer realmsServer, String string, boolean bool, boolean bool2, RealmsWorldSlotButton.Action action)
private static RealmsWorldSlotButton.Action
method_27455(RealmsServer realmsServer, boolean bool, boolean bool2)
void
renderButton(MatrixStack matrices, int mouseX, int mouseY, float delta)
void
tick()
Methods inherited from class net.minecraft.client.gui.widget.ButtonWidget
onPress, renderToolTip
Methods inherited from class net.minecraft.client.gui.widget.AbstractPressableButtonWidget
keyPressed, onClick
Methods inherited from class net.minecraft.client.gui.widget.AbstractButtonWidget
changeFocus, clicked, getHeight, getMessage, getNarrationMessage, getWidth, getYImage, isFocused, isHovered, isMouseOver, isValidClickButton, mouseClicked, mouseDragged, mouseReleased, narrate, onDrag, onFocusedChanged, onRelease, playDownSound, queueNarration, render, renderBg, setAlpha, setFocused, setMessage, setWidth
Methods 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, setZOffset
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraft.client.gui.Element
charTyped, keyReleased, mouseMoved, mouseScrolled
-
Field Details
-
SLOT_FRAME
-
EMPTY_FRAME
-
PANORAMA_0
-
PANORAMA_2
-
PANORAMA_3
-
field_26468
-
field_26469
-
field_26470
-
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:
tick
in 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:
renderButton
in 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)
-