Package com.mojang.realmsclient.gui
Class RealmsWorldSlotButton
java.lang.Object
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,TabOrderedElement,LayoutElement,NarratableEntry,NarrationSupplier,IAbstractWidgetExtension
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic classNested classes/interfaces inherited from class net.minecraft.client.gui.components.Button
Button.Builder, Button.CreateNarration, Button.OnPressNested classes/interfaces inherited from interface net.minecraft.client.gui.narration.NarratableEntry
NarratableEntry.NarrationPriority -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final ResourceLocationstatic final ResourceLocationstatic final ResourceLocationstatic final ResourceLocationstatic final ResourceLocation(package private) static final Componentprivate static final Componentprivate static final ResourceLocationprivate final intprivate RealmsWorldSlotButton.Stateprivate static final Componentprivate static final ComponentFields inherited from class net.minecraft.client.gui.components.Button
BIG_WIDTH, createNarration, DEFAULT_HEIGHT, DEFAULT_NARRATION, DEFAULT_SPACING, DEFAULT_WIDTH, onPress, SMALL_WIDTHFields inherited from class net.minecraft.client.gui.components.AbstractButton
SPRITES, TEXT_MARGINFields inherited from class net.minecraft.client.gui.components.AbstractWidget
active, alpha, height, isHovered, packedFGColor, UNSET_FG_COLOR, visible, widthFields inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
DOUBLE_CLICK_THRESHOLD_MS -
Constructor Summary
ConstructorsConstructorDescriptionRealmsWorldSlotButton(int x, int y, int width, int height, int slotIndex, Button.OnPress onPress) -
Method Summary
Modifier and TypeMethodDescription(package private) static RealmsWorldSlotButton.ActiongetAction(RealmsServer realmsServer, boolean isCurrentlyActiveSlot, boolean minigame) getState()voidrenderWidget(GuiGraphics guiGraphics, int mouseX, int mouseY, float partialTick) voidsetServerData(RealmsServer serverData) private voidsetTooltipAndNarration(RealmsWorldSlotButton.State state, String minigameName) Methods inherited from class net.minecraft.client.gui.components.Button
builder, createNarrationMessage, onPress, updateWidgetNarrationMethods inherited from class net.minecraft.client.gui.components.AbstractButton
keyPressed, onClick, renderStringMethods inherited from class net.minecraft.client.gui.components.AbstractWidget
clearFGColor, clicked, defaultButtonNarrationText, getBottom, getFGColor, getHeight, getMessage, getRectangle, getRight, getTabOrderGroup, getTooltip, getWidth, getX, getY, isActive, isFocused, isHovered, isHoveredOrFocused, isMouseOver, isValidClickButton, mouseClicked, mouseDragged, mouseReleased, narrationPriority, nextFocusPath, onDrag, onRelease, playDownSound, render, renderScrollingString, renderScrollingString, renderScrollingString, setAlpha, setFGColor, setFocused, setHeight, setMessage, setRectangle, setSize, setTabOrderGroup, setTooltip, setTooltipDelay, setWidth, setX, setY, updateNarration, visitWidgets, wrapDefaultNarrationMessageMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
charTyped, getCurrentFocusPath, keyReleased, mouseMoved, mouseScrolledMethods inherited from interface net.neoforged.neoforge.client.extensions.IAbstractWidgetExtension
onClickMethods inherited from interface net.minecraft.client.gui.layouts.LayoutElement
setPosition
-
Field Details
-
SLOT_FRAME_SPRITE
-
CHECKMARK_SPRITE
-
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
-
MINIGAME
-
slotIndex
private final int slotIndex -
state
-
-
Constructor Details
-
RealmsWorldSlotButton
public RealmsWorldSlotButton(int x, int y, int width, int height, int slotIndex, Button.OnPress onPress)
-
-
Method Details
-
getState
-
setServerData
-
setTooltipAndNarration
private void setTooltipAndNarration(RealmsWorldSlotButton.State state, @Nullable String minigameName) -
getAction
static RealmsWorldSlotButton.Action getAction(RealmsServer realmsServer, boolean isCurrentlyActiveSlot, boolean minigame) -
renderWidget
- Overrides:
renderWidgetin classAbstractButton
-