Package com.mojang.realmsclient.gui
Class RealmsServerSlotButton
java.lang.Object
net.minecraft.client.gui.AbstractGui
net.minecraft.client.gui.widget.Widget
net.minecraft.client.gui.widget.button.AbstractButton
net.minecraft.client.gui.widget.button.Button
com.mojang.realmsclient.gui.RealmsServerSlotButton
- All Implemented Interfaces:
IGuiEventListener
,IRenderable
,IScreen
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
static class
Nested classes/interfaces inherited from class net.minecraft.client.gui.widget.button.Button
Button.IPressable, Button.ITooltip
-
Field Summary
Modifier and TypeFieldDescriptionprivate int
static final ResourceLocation
static final ResourceLocation
static final ResourceLocation
static final ResourceLocation
private final Supplier<RealmsServer>
private static final ITextComponent
static final ResourceLocation
private final int
private static final ITextComponent
private static final ITextComponent
private final Consumer<ITextComponent>
Fields inherited from class net.minecraft.client.gui.widget.button.Button
NO_TOOLTIP, onPress, onTooltip
Fields inherited from class net.minecraft.client.gui.widget.Widget
active, alpha, height, isHovered, nextNarration, packedFGColor, UNSET_FG_COLOR, visible, WIDGETS_LOCATION, width, x, y
Fields inherited from class net.minecraft.client.gui.AbstractGui
BACKGROUND_LOCATION, GUI_ICONS_LOCATION, STATS_ICON_LOCATION
-
Constructor Summary
ConstructorDescriptionRealmsServerSlotButton
(int p_i232195_1_, int p_i232195_2_, int p_i232195_3_, int p_i232195_4_, Supplier<RealmsServer> p_i232195_5_, Consumer<ITextComponent> p_i232195_6_, int p_i232195_7_, Button.IPressable p_i232195_8_) -
Method Summary
Modifier and TypeMethodDescriptionprivate void
drawSlotFrame
(MatrixStack p_237718_1_, int p_237718_2_, int p_237718_3_, int p_237718_4_, int p_237718_5_, boolean p_237718_6_, String p_237718_7_, int p_237718_8_, long p_237718_9_, String p_237718_11_, boolean p_237718_12_, boolean p_237718_13_, RealmsServerSlotButton.Action p_237718_14_, ITextComponent p_237718_15_) private static RealmsServerSlotButton.Action
getAction
(RealmsServer p_237720_0_, boolean p_237720_1_, boolean p_237720_2_) getState()
private com.mojang.datafixers.util.Pair<ITextComponent,
ITextComponent> getTooltipAndNarration
(RealmsServer p_237719_1_, String p_237719_2_, boolean p_237719_3_, boolean p_237719_4_, RealmsServerSlotButton.Action p_237719_5_) void
renderButton
(MatrixStack p_230431_1_, int p_230431_2_, int p_230431_3_, float p_230431_4_) void
tick()
Methods inherited from class net.minecraft.client.gui.widget.button.Button
onPress, renderToolTip
Methods inherited from class net.minecraft.client.gui.widget.button.AbstractButton
keyPressed, onClick
Methods inherited from class net.minecraft.client.gui.widget.Widget
changeFocus, clearFGColor, clicked, createNarrationMessage, getFGColor, getHeight, getMessage, getWidth, getYImage, isFocused, isHovered, isMouseOver, isValidClickButton, mouseClicked, mouseDragged, mouseReleased, narrate, onDrag, onFocusedChanged, onRelease, playDownSound, queueNarration, render, renderBg, setAlpha, setFGColor, setFocused, setHeight, setMessage, setWidth
Methods inherited from class net.minecraft.client.gui.AbstractGui
blit, blit, blit, blit, blit, blitOutlineBlack, drawCenteredString, drawCenteredString, drawString, drawString, fill, fillGradient, fillGradient, getBlitOffset, hLine, setBlitOffset, vLine
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.IGuiEventListener
charTyped, keyReleased, mouseMoved, mouseScrolled
-
Field Details
-
SLOT_FRAME_LOCATION
-
EMPTY_SLOT_LOCATION
-
DEFAULT_WORLD_SLOT_1
-
DEFAULT_WORLD_SLOT_2
-
DEFAULT_WORLD_SLOT_3
-
SLOT_ACTIVE_TOOLTIP
-
SWITCH_TO_MINIGAME_SLOT_TOOLTIP
-
SWITCH_TO_WORLD_SLOT_TOOLTIP
-
serverDataProvider
-
toolTipSetter
-
slotIndex
private final int slotIndex -
animTick
private int animTick -
state
-
-
Constructor Details
-
RealmsServerSlotButton
public RealmsServerSlotButton(int p_i232195_1_, int p_i232195_2_, int p_i232195_3_, int p_i232195_4_, Supplier<RealmsServer> p_i232195_5_, Consumer<ITextComponent> p_i232195_6_, int p_i232195_7_, Button.IPressable p_i232195_8_)
-
-
Method Details
-
getState
-
tick
public void tick() -
getAction
private static RealmsServerSlotButton.Action getAction(RealmsServer p_237720_0_, boolean p_237720_1_, boolean p_237720_2_) -
getTooltipAndNarration
private com.mojang.datafixers.util.Pair<ITextComponent,ITextComponent> getTooltipAndNarration(RealmsServer p_237719_1_, String p_237719_2_, boolean p_237719_3_, boolean p_237719_4_, RealmsServerSlotButton.Action p_237719_5_) -
renderButton
public void renderButton(MatrixStack p_230431_1_, int p_230431_2_, int p_230431_3_, float p_230431_4_) - Overrides:
renderButton
in classButton
-
drawSlotFrame
private void drawSlotFrame(MatrixStack p_237718_1_, int p_237718_2_, int p_237718_3_, int p_237718_4_, int p_237718_5_, boolean p_237718_6_, String p_237718_7_, int p_237718_8_, long p_237718_9_, @Nullable String p_237718_11_, boolean p_237718_12_, boolean p_237718_13_, RealmsServerSlotButton.Action p_237718_14_, @Nullable ITextComponent p_237718_15_)
-