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
public class RealmsServerSlotButton extends Button implements IScreen
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
RealmsServerSlotButton.Action
static class
RealmsServerSlotButton.ServerData
-
Nested classes/interfaces inherited from class net.minecraft.client.gui.widget.button.Button
Button.IPressable, Button.ITooltip
-
-
Field Summary
Fields Modifier and Type Field Description private int
animTick
static ResourceLocation
DEFAULT_WORLD_SLOT_1
static ResourceLocation
DEFAULT_WORLD_SLOT_2
static ResourceLocation
DEFAULT_WORLD_SLOT_3
static ResourceLocation
EMPTY_SLOT_LOCATION
private java.util.function.Supplier<RealmsServer>
serverDataProvider
private static ITextComponent
SLOT_ACTIVE_TOOLTIP
static ResourceLocation
SLOT_FRAME_LOCATION
private int
slotIndex
private RealmsServerSlotButton.ServerData
state
private static ITextComponent
SWITCH_TO_MINIGAME_SLOT_TOOLTIP
private static ITextComponent
SWITCH_TO_WORLD_SLOT_TOOLTIP
private java.util.function.Consumer<ITextComponent>
toolTipSetter
-
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
Constructors Constructor Description RealmsServerSlotButton(int p_i232195_1_, int p_i232195_2_, int p_i232195_3_, int p_i232195_4_, java.util.function.Supplier<RealmsServer> p_i232195_5_, java.util.function.Consumer<ITextComponent> p_i232195_6_, int p_i232195_7_, Button.IPressable p_i232195_8_)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description 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_, java.lang.String p_237718_7_, int p_237718_8_, long p_237718_9_, java.lang.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_)
RealmsServerSlotButton.ServerData
getState()
private com.mojang.datafixers.util.Pair<ITextComponent,ITextComponent>
getTooltipAndNarration(RealmsServer p_237719_1_, java.lang.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 Detail
-
SLOT_FRAME_LOCATION
public static final ResourceLocation SLOT_FRAME_LOCATION
-
EMPTY_SLOT_LOCATION
public static final ResourceLocation EMPTY_SLOT_LOCATION
-
DEFAULT_WORLD_SLOT_1
public static final ResourceLocation DEFAULT_WORLD_SLOT_1
-
DEFAULT_WORLD_SLOT_2
public static final ResourceLocation DEFAULT_WORLD_SLOT_2
-
DEFAULT_WORLD_SLOT_3
public static final ResourceLocation DEFAULT_WORLD_SLOT_3
-
SLOT_ACTIVE_TOOLTIP
private static final ITextComponent SLOT_ACTIVE_TOOLTIP
-
SWITCH_TO_MINIGAME_SLOT_TOOLTIP
private static final ITextComponent SWITCH_TO_MINIGAME_SLOT_TOOLTIP
-
SWITCH_TO_WORLD_SLOT_TOOLTIP
private static final ITextComponent SWITCH_TO_WORLD_SLOT_TOOLTIP
-
serverDataProvider
private final java.util.function.Supplier<RealmsServer> serverDataProvider
-
toolTipSetter
private final java.util.function.Consumer<ITextComponent> toolTipSetter
-
slotIndex
private final int slotIndex
-
animTick
private int animTick
-
state
@Nullable private RealmsServerSlotButton.ServerData state
-
-
Constructor Detail
-
RealmsServerSlotButton
public RealmsServerSlotButton(int p_i232195_1_, int p_i232195_2_, int p_i232195_3_, int p_i232195_4_, java.util.function.Supplier<RealmsServer> p_i232195_5_, java.util.function.Consumer<ITextComponent> p_i232195_6_, int p_i232195_7_, Button.IPressable p_i232195_8_)
-
-
Method Detail
-
getState
@Nullable public RealmsServerSlotButton.ServerData getState()
-
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_, java.lang.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_, java.lang.String p_237718_7_, int p_237718_8_, long p_237718_9_, @Nullable java.lang.String p_237718_11_, boolean p_237718_12_, boolean p_237718_13_, RealmsServerSlotButton.Action p_237718_14_, @Nullable ITextComponent p_237718_15_)
-
-