Package com.mojang.realmsclient.gui
Class RealmsWorldSlotButton
java.lang.Object
net.minecraft.client.gui.GuiComponent
net.minecraft.client.gui.components.AbstractWidget
net.minecraft.client.gui.components.AbstractButton
net.minecraft.client.gui.components.Button
com.mojang.realmsclient.gui.RealmsWorldSlotButton
- All Implemented Interfaces:
GuiEventListener
,Renderable
,NarratableEntry
,NarrationSupplier
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
static class
Nested classes/interfaces inherited from class net.minecraft.client.gui.components.Button
Button.Builder, Button.CreateNarration, Button.OnPress
Nested classes/interfaces inherited from interface net.minecraft.client.gui.narration.NarratableEntry
NarratableEntry.NarrationPriority
-
Field Summary
Modifier and TypeFieldDescriptionstatic final ResourceLocation
static final ResourceLocation
static final ResourceLocation
static final ResourceLocation
static final ResourceLocation
private final Supplier<RealmsServer>
private static final Component
static final ResourceLocation
private final int
private RealmsWorldSlotButton.State
private static final Component
private static final Component
Fields inherited from class net.minecraft.client.gui.components.Button
createNarration, DEFAULT_HEIGHT, DEFAULT_NARRATION, DEFAULT_WIDTH, onPress, SMALL_WIDTH
Fields inherited from class net.minecraft.client.gui.components.AbstractWidget
active, alpha, height, isHovered, packedFGColor, UNSET_FG_COLOR, visible, WIDGETS_LOCATION, width
Fields inherited from class net.minecraft.client.gui.GuiComponent
BACKGROUND_LOCATION, GUI_ICONS_LOCATION, STATS_ICON_LOCATION
Fields inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
DOUBLE_CLICK_THRESHOLD_MS
-
Constructor Summary
ConstructorDescriptionRealmsWorldSlotButton
(int p_87929_, int p_87930_, int p_87931_, int p_87932_, Supplier<RealmsServer> p_87933_, Consumer<Component> p_87934_, int p_87935_, Button.OnPress p_87936_) -
Method Summary
Modifier and TypeMethodDescriptionprivate void
drawSlotFrame
(PoseStack p_87939_, int p_87940_, int p_87941_, int p_87942_, int p_87943_, boolean p_87944_, String p_87945_, int p_87946_, long p_87947_, String p_87948_, boolean p_87949_, boolean p_87950_, RealmsWorldSlotButton.Action p_87951_, Component p_87952_) private static RealmsWorldSlotButton.Action
getAction
(RealmsServer p_87960_, boolean p_87961_, boolean p_87962_) getState()
getTooltipAndNarration
(RealmsServer p_87954_, String p_87955_, boolean p_87956_, boolean p_87957_, RealmsWorldSlotButton.Action p_87958_) void
renderButton
(PoseStack p_87964_, int p_87965_, int p_87966_, float p_87967_) private void
renderCheckMark
(PoseStack p_231299_, int p_231300_, int p_231301_) void
tick()
Methods inherited from class net.minecraft.client.gui.components.Button
builder, createNarrationMessage, onPress, updateWidgetNarration
Methods inherited from class net.minecraft.client.gui.components.AbstractButton
keyPressed, onClick
Methods inherited from class net.minecraft.client.gui.components.AbstractWidget
changeFocus, clearFGColor, clicked, createTooltipPositioner, defaultButtonNarrationText, getFGColor, getHeight, getMessage, getWidth, getX, getY, getYImage, isActive, isFocused, isHoveredOrFocused, isMouseOver, isValidClickButton, mouseClicked, mouseDragged, mouseReleased, narrationPriority, onDrag, onFocusedChanged, onRelease, playDownSound, render, renderBg, setAlpha, setFGColor, setFocused, setHeight, setMessage, setPosition, setTooltip, setTooltipDelay, setWidth, setX, setY, updateNarration, wrapDefaultNarrationMessage
Methods inherited from class net.minecraft.client.gui.GuiComponent
blit, blit, blit, blit, blit, blitOutlineBlack, disableScissor, drawCenteredString, drawCenteredString, drawCenteredString, drawString, drawString, drawString, enableScissor, fill, fillGradient, 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.components.events.GuiEventListener
charTyped, keyReleased, mouseMoved, mouseScrolled
-
Field Details
-
SLOT_FRAME_LOCATION
-
EMPTY_SLOT_LOCATION
-
CHECK_MARK_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 -
state
-
-
Constructor Details
-
RealmsWorldSlotButton
public RealmsWorldSlotButton(int p_87929_, int p_87930_, int p_87931_, int p_87932_, Supplier<RealmsServer> p_87933_, Consumer<Component> p_87934_, int p_87935_, Button.OnPress p_87936_)
-
-
Method Details
-
getState
-
tick
public void tick() -
getAction
private static RealmsWorldSlotButton.Action getAction(RealmsServer p_87960_, boolean p_87961_, boolean p_87962_) -
getTooltipAndNarration
private com.mojang.datafixers.util.Pair<Component,Component> getTooltipAndNarration(RealmsServer p_87954_, String p_87955_, boolean p_87956_, boolean p_87957_, RealmsWorldSlotButton.Action p_87958_) -
renderButton
- Overrides:
renderButton
in classAbstractWidget
-
drawSlotFrame
private void drawSlotFrame(PoseStack p_87939_, int p_87940_, int p_87941_, int p_87942_, int p_87943_, boolean p_87944_, String p_87945_, int p_87946_, long p_87947_, @Nullable String p_87948_, boolean p_87949_, boolean p_87950_, RealmsWorldSlotButton.Action p_87951_, @Nullable Component p_87952_) -
renderCheckMark
-