Class RealmsConfigureWorldScreen
java.lang.Object
net.minecraft.client.gui.DrawableHelper
net.minecraft.client.gui.AbstractParentElement
net.minecraft.client.gui.screen.Screen
net.minecraft.client.realms.gui.screen.RealmsScreen
net.minecraft.client.realms.gui.screen.RealmsScreenWithCallback
net.minecraft.client.realms.gui.screen.RealmsConfigureWorldScreen
- All Implemented Interfaces:
Drawable,Element,ParentElement,TickableElement
@Environment(CLIENT) public class RealmsConfigureWorldScreen extends RealmsScreenWithCallback
-
Field Summary
Fields Modifier and Type Field Description private intanimTickprivate ButtonWidgetbackupButtonprivate intclicksprivate static IdentifierEXPIRED_ICONprivate static IdentifierEXPIRES_SOON_ICONprivate static Textfield_26479private static Textfield_26480private static Textfield_26481private static Textfield_26482private static Textfield_26483private static Textfield_26484private static Textfield_26485private static Textfield_26486private intleft_xprivate static LoggerLOGGERprivate static IdentifierOFF_ICONprivate static IdentifierON_ICONprivate ButtonWidgetoptionsButtonprivate RealmsMainScreenparentprivate ButtonWidgetplayersButtonprivate ButtonWidgetresetWorldButtonprivate intright_xprivate RealmsServerserverprivate longserverIdprivate ButtonWidgetsettingsButtonprivate booleanstateChangedprivate ButtonWidgetsubscriptionButtonprivate ButtonWidgetswitchMinigameButtonprivate TexttoolTipFields inherited from class net.minecraft.client.gui.screen.Screen
buttons, children, client, height, itemRenderer, passEvents, textRenderer, title, widthFields inherited from class net.minecraft.client.gui.DrawableHelper
GUI_ICONS_TEXTURE, OPTIONS_BACKGROUND_TEXTURE, STATS_ICON_TEXTURE -
Constructor Summary
Constructors Constructor Description RealmsConfigureWorldScreen(RealmsMainScreen parent, long serverId) -
Method Summary
Modifier and Type Method Description private voidaddButton(ButtonWidget button)private voidaddSlotButton(int slotIndex)private voidbackButtonClicked()private intbuttonCenter(int i, int total)private intbuttonLeft(int i)protected voidcallback(WorldTemplate template)voidcloseTheWorld(Screen screen)private voiddisableButtons()private voiddrawClosed(MatrixStack matrixStack, int int2, int int3, int int4, int int5)private voiddrawExpired(MatrixStack matrixStack, int int2, int int3, int int4, int int5)private voiddrawExpiring(MatrixStack matrixStack, int int2, int int3, int int4, int int5, int int6)private voiddrawOpen(MatrixStack matrixStack, int int2, int int3, int int4, int int5)private voiddrawServerStatus(MatrixStack matrixStack, int int2, int int3, int int4, int int5)private voidfetchServerData(long worldId)private intframe(int ordinal)RealmsConfigureWorldScreengetNewScreen()private voidhideMinigameButtons()private voidhideRegularButtons()voidinit()Called when a screen should be initialized.private booleanisMinigame()private voidjoinRealm(RealmsServer serverData)booleankeyPressed(int keyCode, int scanCode, int modifiers)Callback for when a key down event has been captured.voidopenTheWorld(boolean join, Screen screen)private voidremoveButton(ButtonWidget button)voidremoved()voidrender(MatrixStack matrices, int mouseX, int mouseY, float delta)protected voidrenderMousehoverTooltip(MatrixStack matrixStack, Text text, int int2, int int3)voidsaveSettings(String name, String desc)voidsaveSlotSettings(RealmsWorldOptions options)voidstateChanged()private voidswitchToEmptySlot(int selectedSlot, RealmsServer serverData)private voidswitchToFullSlot(int selectedSlot, RealmsServer serverData)private voidswitchToMinigame()voidtick()Methods inherited from class net.minecraft.client.realms.gui.screen.RealmsScreen
narrateLabels, rowMethods inherited from class net.minecraft.client.gui.screen.Screen
addButton, addChild, children, filesDragged, getNarrationMessage, getTitle, getTooltipFromItem, handleTextClick, hasAltDown, hasControlDown, hasShiftDown, init, insertText, isCopy, isCut, isMouseOver, isPaste, isPauseScreen, isSelectAll, isValidCharacterForName, onClose, renderBackground, renderBackground, renderBackgroundTexture, renderOrderedTooltip, renderTextHoverEffect, renderTooltip, renderTooltip, renderTooltip, resize, sendMessage, sendMessage, shouldCloseOnEsc, wrapScreenErrorMethods inherited from class net.minecraft.client.gui.AbstractParentElement
getFocused, isDragging, setDragging, setFocusedMethods inherited from class net.minecraft.client.gui.DrawableHelper
drawCenteredString, drawCenteredText, drawHorizontalLine, drawSprite, drawStringWithShadow, drawTexture, drawTexture, drawTexture, drawTexture, drawTextWithShadow, drawVerticalLine, fill, fillGradient, fillGradient, getZOffset, method_29343, setZOffsetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.client.gui.Element
mouseMovedMethods inherited from interface net.minecraft.client.gui.ParentElement
changeFocus, charTyped, focusOn, hoveredElement, keyReleased, mouseClicked, mouseDragged, mouseReleased, mouseScrolled, setInitialFocus
-
Field Details
-
LOGGER
-
ON_ICON
-
OFF_ICON
-
EXPIRED_ICON
-
EXPIRES_SOON_ICON
-
field_26479
-
field_26480
-
field_26481
-
field_26482
-
field_26483
-
field_26484
-
field_26485
-
field_26486
-
toolTip
-
parent
-
server
-
serverId
private final long serverId -
left_x
private int left_x -
right_x
private int right_x -
playersButton
-
settingsButton
-
subscriptionButton
-
optionsButton
-
backupButton
-
resetWorldButton
-
switchMinigameButton
-
stateChanged
private boolean stateChanged -
animTick
private int animTick -
clicks
private int clicks
-
-
Constructor Details
-
RealmsConfigureWorldScreen
-
-
Method Details
-
init
public void init()Called when a screen should be initialized.This method is called when this screen is
openedor resized. -
addSlotButton
private void addSlotButton(int slotIndex) -
buttonLeft
private int buttonLeft(int i) -
buttonCenter
private int buttonCenter(int i, int total) -
tick
public void tick()- Specified by:
tickin interfaceTickableElement- Overrides:
tickin classRealmsScreen
-
render
-
frame
private int frame(int ordinal) -
removed
public void removed() -
keyPressed
public boolean keyPressed(int keyCode, int scanCode, int modifiers)Callback for when a key down event has been captured. The key code is identified by the constants inGLFWclass.- Specified by:
keyPressedin interfaceElement- Specified by:
keyPressedin interfaceParentElement- Overrides:
keyPressedin classScreen- Parameters:
keyCode- the named key code of the event as described in theGLFWclassscanCode- the unique/platform-specific scan code of the keyboard inputmodifiers- a GLFW bitfield describing the modifier keys that are held down (see {@linkplain https://www.glfw.org/docs/3.3/group__mods.html GLFW Modifier key flags})- Returns:
trueto indicate that the event handling is successful/valid- See Also:
Keyboard.onKey(long, int, int, int, int),GLFW.GLFW_KEY_Q,GLFWKeyCallbackI.invoke(long, int, int, int, int)
-
backButtonClicked
private void backButtonClicked() -
fetchServerData
private void fetchServerData(long worldId) -
disableButtons
private void disableButtons() -
joinRealm
-
switchToMinigame
private void switchToMinigame() -
switchToFullSlot
-
switchToEmptySlot
-
renderMousehoverTooltip
protected void renderMousehoverTooltip(MatrixStack matrixStack, @Nullable Text text, int int2, int int3) -
drawServerStatus
-
drawExpired
-
drawExpiring
private void drawExpiring(MatrixStack matrixStack, int int2, int int3, int int4, int int5, int int6) -
drawOpen
-
drawClosed
-
isMinigame
private boolean isMinigame() -
hideRegularButtons
private void hideRegularButtons() -
removeButton
-
addButton
-
hideMinigameButtons
private void hideMinigameButtons() -
saveSlotSettings
-
saveSettings
-
openTheWorld
-
closeTheWorld
-
stateChanged
public void stateChanged() -
callback
- Specified by:
callbackin classRealmsScreenWithCallback
-
getNewScreen
-