@Environment(value=CLIENT) public class RealmsWorldSlotButton extends ButtonWidget implements TickableElement
Modifier and Type | Class and Description |
---|---|
static class |
RealmsWorldSlotButton.Action |
static class |
RealmsWorldSlotButton.State |
ButtonWidget.PressAction, ButtonWidget.TooltipSupplier
Modifier and Type | Field and Description |
---|---|
private int |
animTick |
static Identifier |
EMPTY_FRAME |
private static Text |
field_26468 |
private static Text |
field_26469 |
private static Text |
field_26470 |
static Identifier |
PANORAMA_0 |
static Identifier |
PANORAMA_2 |
static Identifier |
PANORAMA_3 |
private Supplier<RealmsServer> |
serverDataProvider |
static Identifier |
SLOT_FRAME |
private int |
slotIndex |
private RealmsWorldSlotButton.State |
state |
private Consumer<Text> |
toolTipSetter |
EMPTY, onPress, tooltipSupplier
active, alpha, height, hovered, nextNarration, visible, WIDGETS_LOCATION, width, x, y
GUI_ICONS_TEXTURE, OPTIONS_BACKGROUND_TEXTURE, STATS_ICON_TEXTURE
Constructor and Description |
---|
RealmsWorldSlotButton(int x,
int y,
int width,
int height,
Supplier<RealmsServer> serverDataProvider,
Consumer<Text> toolTipSetter,
int id,
ButtonWidget.PressAction action) |
Modifier and Type | Method and Description |
---|---|
private void |
drawSlotFrame(MatrixStack matrices,
int x,
int y,
int mouseX,
int mouseY,
boolean bool,
String text,
int int2,
long long2,
String string,
boolean bool2,
boolean bool3,
RealmsWorldSlotButton.Action action,
Text text2) |
RealmsWorldSlotButton.State |
getState() |
private com.mojang.datafixers.util.Pair<Text,Text> |
method_27454(RealmsServer realmsServer,
String string,
boolean bool,
boolean bool2,
RealmsWorldSlotButton.Action action) |
private static RealmsWorldSlotButton.Action |
method_27455(RealmsServer realmsServer,
boolean bool,
boolean bool2) |
void |
renderButton(MatrixStack matrices,
int mouseX,
int mouseY,
float delta) |
void |
tick() |
onPress, renderToolTip
keyPressed, onClick
changeFocus, clicked, getHeight, getMessage, getNarrationMessage, getWidth, getYImage, isFocused, isHovered, isMouseOver, isValidClickButton, mouseClicked, mouseDragged, mouseReleased, narrate, onDrag, onFocusedChanged, onRelease, playDownSound, queueNarration, render, renderBg, setAlpha, setFocused, setMessage, setWidth
drawCenteredString, drawCenteredText, drawHorizontalLine, drawSprite, drawStringWithShadow, drawTexture, drawTexture, drawTexture, drawTexture, drawTextWithShadow, drawVerticalLine, fill, fillGradient, fillGradient, getZOffset, method_29343, setZOffset
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
charTyped, keyReleased, mouseMoved, mouseScrolled
public static final Identifier SLOT_FRAME
public static final Identifier EMPTY_FRAME
public static final Identifier PANORAMA_0
public static final Identifier PANORAMA_2
public static final Identifier PANORAMA_3
private static final Text field_26468
private static final Text field_26469
private static final Text field_26470
private final Supplier<RealmsServer> serverDataProvider
private final int slotIndex
private int animTick
@Nullable private RealmsWorldSlotButton.State state
public RealmsWorldSlotButton(int x, int y, int width, int height, Supplier<RealmsServer> serverDataProvider, Consumer<Text> toolTipSetter, int id, ButtonWidget.PressAction action)
@Nullable public RealmsWorldSlotButton.State getState()
public void tick()
tick
in interface TickableElement
private static RealmsWorldSlotButton.Action method_27455(RealmsServer realmsServer, boolean bool, boolean bool2)
private com.mojang.datafixers.util.Pair<Text,Text> method_27454(RealmsServer realmsServer, String string, boolean bool, boolean bool2, RealmsWorldSlotButton.Action action)
public void renderButton(MatrixStack matrices, int mouseX, int mouseY, float delta)
renderButton
in class ButtonWidget
private void drawSlotFrame(MatrixStack matrices, int x, int y, int mouseX, int mouseY, boolean bool, String text, int int2, long long2, @Nullable String string, boolean bool2, boolean bool3, RealmsWorldSlotButton.Action action, @Nullable Text text2)