Class RealmsSelectWorldTemplateScreen
- java.lang.Object
-
- net.minecraft.client.gui.AbstractGui
-
- net.minecraft.client.gui.FocusableGui
-
- net.minecraft.client.gui.screen.Screen
-
- net.minecraft.realms.RealmsScreen
-
- com.mojang.realmsclient.gui.screens.RealmsSelectWorldTemplateScreen
-
- All Implemented Interfaces:
IGuiEventListener
,INestedGuiEventHandler
,IRenderable
,IScreen
public class RealmsSelectWorldTemplateScreen extends RealmsScreen
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) class
RealmsSelectWorldTemplateScreen.WorldTemplateSelectionEntry
(package private) class
RealmsSelectWorldTemplateScreen.WorldTemplateSelectionList
-
Field Summary
Fields Modifier and Type Field Description private int
clicks
private java.lang.String
currentLink
private boolean
displayWarning
private boolean
hoverWarning
private NotifableRealmsScreen
lastScreen
private static ResourceLocation
LINK_ICON
private static org.apache.logging.log4j.Logger
LOGGER
private java.util.List<TextRenderingUtils.Line>
noTemplatesMessage
private static ITextComponent
PUBLISHER_LINK_TOOLTIP
private Button
publisherButton
private Button
selectButton
private int
selectedTemplate
private static ResourceLocation
SLOT_FRAME_LOCATION
private ITextComponent
title
private ITextComponent
toolTip
private static ResourceLocation
TRAILER_ICON
private static ITextComponent
TRAILER_LINK_TOOLTIP
private Button
trailerButton
private ITextComponent[]
warning
private java.lang.String
warningURL
private RealmsSelectWorldTemplateScreen.WorldTemplateSelectionList
worldTemplateObjectSelectionList
private RealmsServer.ServerType
worldType
-
Fields inherited from class net.minecraft.client.gui.screen.Screen
buttons, children, font, height, itemRenderer, minecraft, passEvents, width
-
Fields inherited from class net.minecraft.client.gui.AbstractGui
BACKGROUND_LOCATION, GUI_ICONS_LOCATION, STATS_ICON_LOCATION
-
-
Constructor Summary
Constructors Constructor Description RealmsSelectWorldTemplateScreen(NotifableRealmsScreen p_i51752_1_, RealmsServer.ServerType p_i51752_2_)
RealmsSelectWorldTemplateScreen(NotifableRealmsScreen p_i51753_1_, RealmsServer.ServerType p_i51753_2_, WorldTemplatePaginatedList p_i51753_3_)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
backButtonClicked()
private com.mojang.datafixers.util.Either<WorldTemplatePaginatedList,java.lang.String>
fetchTemplates(WorldTemplatePaginatedList p_224509_1_, RealmsClient p_224509_2_)
private void
fetchTemplatesAsync(WorldTemplatePaginatedList p_224497_1_)
private WorldTemplate
getSelectedTemplate()
private boolean
hasValidTemplate()
void
init()
boolean
keyPressed(int p_231046_1_, int p_231046_2_, int p_231046_3_)
boolean
mouseClicked(double p_231044_1_, double p_231044_3_, int p_231044_5_)
private void
onPublish()
private void
onTrailer()
void
render(MatrixStack p_230430_1_, int p_230430_2_, int p_230430_3_, float p_230430_4_)
protected void
renderMousehoverTooltip(MatrixStack p_237993_1_, ITextComponent p_237993_2_, int p_237993_3_, int p_237993_4_)
private void
renderMultilineMessage(MatrixStack p_237992_1_, int p_237992_2_, int p_237992_3_, java.util.List<TextRenderingUtils.Line> p_237992_4_)
private void
selectTemplate()
void
setTitle(ITextComponent p_238001_1_)
void
setWarning(ITextComponent... p_238002_1_)
private boolean
shouldPublisherBeVisible()
private boolean
shouldSelectButtonBeActive()
private boolean
shouldTrailerBeVisible()
void
tick()
private void
updateButtonStates()
-
Methods inherited from class net.minecraft.realms.RealmsScreen
narrateLabels, row
-
Methods inherited from class net.minecraft.client.gui.screen.Screen
addButton, addWidget, children, getMinecraft, getNarrationMessage, getTitle, getTooltipFromItem, handleComponentClicked, hasAltDown, hasControlDown, hasShiftDown, init, insertText, isCopy, isCut, isMouseOver, isPaste, isPauseScreen, isSelectAll, isValidCharacterForName, onClose, onFilesDrop, removed, renderBackground, renderBackground, renderComponentHoverEffect, renderComponentTooltip, renderDirtBackground, renderTooltip, renderTooltip, renderTooltip, renderToolTip, renderWrappedToolTip, resize, sendMessage, sendMessage, shouldCloseOnEsc, wrapScreenError
-
Methods inherited from class net.minecraft.client.gui.FocusableGui
getFocused, isDragging, setDragging, setFocused
-
Methods inherited from class net.minecraft.client.gui.AbstractGui
blit, blit, blit, blit, blit, blitOutlineBlack, drawCenteredString, drawCenteredString, drawString, drawString, fill, 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.IGuiEventListener
mouseMoved
-
Methods inherited from interface net.minecraft.client.gui.INestedGuiEventHandler
changeFocus, charTyped, getChildAt, keyReleased, magicalSpecialHackyFocus, mouseDragged, mouseReleased, mouseScrolled, setInitialFocus
-
-
-
-
Field Detail
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER
-
LINK_ICON
private static final ResourceLocation LINK_ICON
-
TRAILER_ICON
private static final ResourceLocation TRAILER_ICON
-
SLOT_FRAME_LOCATION
private static final ResourceLocation SLOT_FRAME_LOCATION
-
PUBLISHER_LINK_TOOLTIP
private static final ITextComponent PUBLISHER_LINK_TOOLTIP
-
TRAILER_LINK_TOOLTIP
private static final ITextComponent TRAILER_LINK_TOOLTIP
-
lastScreen
private final NotifableRealmsScreen lastScreen
-
worldTemplateObjectSelectionList
private RealmsSelectWorldTemplateScreen.WorldTemplateSelectionList worldTemplateObjectSelectionList
-
selectedTemplate
private int selectedTemplate
-
title
private ITextComponent title
-
selectButton
private Button selectButton
-
trailerButton
private Button trailerButton
-
publisherButton
private Button publisherButton
-
toolTip
@Nullable private ITextComponent toolTip
-
currentLink
private java.lang.String currentLink
-
worldType
private final RealmsServer.ServerType worldType
-
clicks
private int clicks
-
warning
@Nullable private ITextComponent[] warning
-
warningURL
private java.lang.String warningURL
-
displayWarning
private boolean displayWarning
-
hoverWarning
private boolean hoverWarning
-
noTemplatesMessage
@Nullable private java.util.List<TextRenderingUtils.Line> noTemplatesMessage
-
-
Constructor Detail
-
RealmsSelectWorldTemplateScreen
public RealmsSelectWorldTemplateScreen(NotifableRealmsScreen p_i51752_1_, RealmsServer.ServerType p_i51752_2_)
-
RealmsSelectWorldTemplateScreen
public RealmsSelectWorldTemplateScreen(NotifableRealmsScreen p_i51753_1_, RealmsServer.ServerType p_i51753_2_, @Nullable WorldTemplatePaginatedList p_i51753_3_)
-
-
Method Detail
-
setTitle
public void setTitle(ITextComponent p_238001_1_)
-
setWarning
public void setWarning(ITextComponent... p_238002_1_)
-
mouseClicked
public boolean mouseClicked(double p_231044_1_, double p_231044_3_, int p_231044_5_)
-
updateButtonStates
private void updateButtonStates()
-
shouldSelectButtonBeActive
private boolean shouldSelectButtonBeActive()
-
shouldPublisherBeVisible
private boolean shouldPublisherBeVisible()
-
getSelectedTemplate
private WorldTemplate getSelectedTemplate()
-
shouldTrailerBeVisible
private boolean shouldTrailerBeVisible()
-
tick
public void tick()
- Specified by:
tick
in interfaceIScreen
- Overrides:
tick
in classRealmsScreen
-
keyPressed
public boolean keyPressed(int p_231046_1_, int p_231046_2_, int p_231046_3_)
- Specified by:
keyPressed
in interfaceIGuiEventListener
- Specified by:
keyPressed
in interfaceINestedGuiEventHandler
- Overrides:
keyPressed
in classScreen
-
backButtonClicked
private void backButtonClicked()
-
selectTemplate
private void selectTemplate()
-
hasValidTemplate
private boolean hasValidTemplate()
-
onTrailer
private void onTrailer()
-
onPublish
private void onPublish()
-
fetchTemplatesAsync
private void fetchTemplatesAsync(WorldTemplatePaginatedList p_224497_1_)
-
fetchTemplates
private com.mojang.datafixers.util.Either<WorldTemplatePaginatedList,java.lang.String> fetchTemplates(WorldTemplatePaginatedList p_224509_1_, RealmsClient p_224509_2_)
-
render
public void render(MatrixStack p_230430_1_, int p_230430_2_, int p_230430_3_, float p_230430_4_)
- Specified by:
render
in interfaceIRenderable
- Overrides:
render
in classScreen
-
renderMultilineMessage
private void renderMultilineMessage(MatrixStack p_237992_1_, int p_237992_2_, int p_237992_3_, java.util.List<TextRenderingUtils.Line> p_237992_4_)
-
renderMousehoverTooltip
protected void renderMousehoverTooltip(MatrixStack p_237993_1_, @Nullable ITextComponent p_237993_2_, int p_237993_3_, int p_237993_4_)
-
-