Package com.mojang.realmsclient.gui
Class RealmsWorldSlotButton
java.lang.Object
net.minecraft.client.gui.components.AbstractWidget
net.minecraft.client.gui.components.AbstractWidget.WithInactiveMessage
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
-
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.OnPress, Button.PlainNested classes/interfaces inherited from class net.minecraft.client.gui.components.AbstractWidget
AbstractWidget.WithInactiveMessageNested classes/interfaces inherited from interface net.minecraft.client.gui.narration.NarratableEntry
NarratableEntry.NarrationPriority -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Identifierstatic final Identifierstatic final Identifierprivate static final Stringstatic final Identifier(package private) static final Componentprivate static final Identifierprivate final intprivate RealmsWorldSlotButton.Stateprivate static final Componentprivate static final Componentprivate static final intFields 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, message, packedFGColor, UNSET_FG_COLOR, visible, width -
Constructor Summary
ConstructorsConstructorDescriptionRealmsWorldSlotButton(int pX, int pY, int pWidth, int pHeight, int pSlotIndex, RealmsServer pServerData, Button.OnPress pOnPress) -
Method Summary
Modifier and TypeMethodDescription(package private) static RealmsWorldSlotButton.ActiongetAction(boolean pActiveSlot, boolean pEmpty, boolean pExpired) getState()booleanisActive()voidrenderContents(GuiGraphics p_282947_, int p_87965_, int p_87966_, float p_87967_) setServerData(RealmsServer pServerData) private voidsetTooltipAndNarration(RealmsWorldSlotButton.State pState, @Nullable String pMinigameName) 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, renderDefaultLabel, renderDefaultSprite, renderWidget, setOverrideRenderHighlightedSpriteMethods inherited from class net.minecraft.client.gui.components.AbstractWidget.WithInactiveMessage
defaultInactiveMessage, getMessage, setMessageMethods inherited from class net.minecraft.client.gui.components.AbstractWidget
clearFGColor, defaultButtonNarrationText, getAlpha, getBottom, getFGColor, getHeight, getRectangle, getRight, getTabOrderGroup, getWidth, getX, getY, handleCursor, isFocused, isHovered, isHoveredOrFocused, isMouseOver, isValidClickButton, mouseClicked, mouseDragged, mouseReleased, narrationPriority, nextFocusPath, onDrag, onRelease, playButtonClickSound, playDownSound, render, renderScrollingStringOverContents, setAlpha, setFGColor, setFocused, setHeight, 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, getBorderForArrowNavigation, getCurrentFocusPath, keyReleased, mouseMoved, mouseScrolled, shouldTakeFocusAfterInteractionMethods inherited from interface net.minecraft.client.gui.layouts.LayoutElement
setPositionMethods inherited from interface net.minecraft.client.gui.narration.NarratableEntry
getNarratables
-
Field Details
-
SLOT_FRAME_SPRITE
-
EMPTY_SLOT_LOCATION
-
DEFAULT_WORLD_SLOT_1
-
DEFAULT_WORLD_SLOT_2
-
DEFAULT_WORLD_SLOT_3
-
SWITCH_TO_MINIGAME_SLOT_TOOLTIP
-
SWITCH_TO_WORLD_SLOT_TOOLTIP
-
MINIGAME
-
WORLD_NAME_MAX_WIDTH
private static final int WORLD_NAME_MAX_WIDTH- See Also:
-
DOTS
- See Also:
-
slotIndex
private final int slotIndex -
state
-
-
Constructor Details
-
RealmsWorldSlotButton
public RealmsWorldSlotButton(int pX, int pY, int pWidth, int pHeight, int pSlotIndex, RealmsServer pServerData, Button.OnPress pOnPress)
-
-
Method Details
-
getState
-
setServerData
-
setTooltipAndNarration
private void setTooltipAndNarration(RealmsWorldSlotButton.State pState, @Nullable String pMinigameName) -
getAction
static RealmsWorldSlotButton.Action getAction(boolean pActiveSlot, boolean pEmpty, boolean pExpired) -
isActive
public boolean isActive()- Specified by:
isActivein interfaceNarratableEntry- Overrides:
isActivein classAbstractWidget
-
renderContents
- Specified by:
renderContentsin classAbstractButton
-