Class RealmsDownloadLatestWorldScreen
- 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.RealmsDownloadLatestWorldScreen
-
- All Implemented Interfaces:
IGuiEventListener
,INestedGuiEventHandler
,IRenderable
,IScreen
public class RealmsDownloadLatestWorldScreen extends RealmsScreen
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
RealmsDownloadLatestWorldScreen.DownloadStatus
-
Field Summary
Fields Modifier and Type Field Description private int
animTick
private long
bytesPersSecond
private it.unimi.dsi.fastutil.booleans.BooleanConsumer
callback
private Button
cancelButton
private boolean
cancelled
private boolean
checked
private int
dotIndex
private static java.lang.String[]
DOTS
private static java.util.concurrent.locks.ReentrantLock
DOWNLOAD_LOCK
private RealmsDownloadLatestWorldScreen.DownloadStatus
downloadStatus
private ITextComponent
downloadTitle
private ITextComponent
errorMessage
private boolean
extracting
private boolean
finished
private Screen
lastScreen
private static org.apache.logging.log4j.Logger
LOGGER
private com.google.common.util.concurrent.RateLimiter
narrationRateLimiter
private java.lang.Long
previousTimeSnapshot
private java.lang.Long
previousWrittenBytes
private java.lang.String
progress
private boolean
showDots
private ITextComponent
status
private WorldDownload
worldDownload
private java.lang.String
worldName
-
Fields inherited from class net.minecraft.client.gui.screen.Screen
buttons, children, font, height, itemRenderer, minecraft, passEvents, title, width
-
Fields inherited from class net.minecraft.client.gui.AbstractGui
BACKGROUND_LOCATION, GUI_ICONS_LOCATION, STATS_ICON_LOCATION
-
-
Constructor Summary
Constructors Constructor Description RealmsDownloadLatestWorldScreen(Screen p_i232203_1_, WorldDownload p_i232203_2_, java.lang.String p_i232203_3_, it.unimi.dsi.fastutil.booleans.BooleanConsumer p_i232203_4_)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
backButtonClicked()
private void
checkDownloadSize()
private void
downloadCancelled()
private void
downloadSave()
private void
drawDots(MatrixStack p_237835_1_)
private void
drawDownloadSpeed(MatrixStack p_237838_1_)
private void
drawDownloadSpeed0(MatrixStack p_237833_1_, long p_237833_2_)
private void
drawProgressBar(MatrixStack p_237836_1_)
private long
getContentLength(java.lang.String p_224152_1_)
void
init()
boolean
keyPressed(int p_231046_1_, int p_231046_2_, int p_231046_3_)
void
render(MatrixStack p_230430_1_, int p_230430_2_, int p_230430_3_, float p_230430_4_)
void
tick()
-
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, mouseClicked, mouseDragged, mouseReleased, mouseScrolled, setInitialFocus
-
-
-
-
Field Detail
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER
-
DOWNLOAD_LOCK
private static final java.util.concurrent.locks.ReentrantLock DOWNLOAD_LOCK
-
lastScreen
private final Screen lastScreen
-
worldDownload
private final WorldDownload worldDownload
-
downloadTitle
private final ITextComponent downloadTitle
-
narrationRateLimiter
private final com.google.common.util.concurrent.RateLimiter narrationRateLimiter
-
cancelButton
private Button cancelButton
-
worldName
private final java.lang.String worldName
-
downloadStatus
private final RealmsDownloadLatestWorldScreen.DownloadStatus downloadStatus
-
errorMessage
private volatile ITextComponent errorMessage
-
status
private volatile ITextComponent status
-
progress
private volatile java.lang.String progress
-
cancelled
private volatile boolean cancelled
-
showDots
private volatile boolean showDots
-
finished
private volatile boolean finished
-
extracting
private volatile boolean extracting
-
previousWrittenBytes
private java.lang.Long previousWrittenBytes
-
previousTimeSnapshot
private java.lang.Long previousTimeSnapshot
-
bytesPersSecond
private long bytesPersSecond
-
animTick
private int animTick
-
DOTS
private static final java.lang.String[] DOTS
-
dotIndex
private int dotIndex
-
checked
private boolean checked
-
callback
private final it.unimi.dsi.fastutil.booleans.BooleanConsumer callback
-
-
Constructor Detail
-
RealmsDownloadLatestWorldScreen
public RealmsDownloadLatestWorldScreen(Screen p_i232203_1_, WorldDownload p_i232203_2_, java.lang.String p_i232203_3_, it.unimi.dsi.fastutil.booleans.BooleanConsumer p_i232203_4_)
-
-
Method Detail
-
checkDownloadSize
private void checkDownloadSize()
-
getContentLength
private long getContentLength(java.lang.String p_224152_1_)
-
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()
-
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
-
drawDots
private void drawDots(MatrixStack p_237835_1_)
-
drawProgressBar
private void drawProgressBar(MatrixStack p_237836_1_)
-
drawDownloadSpeed
private void drawDownloadSpeed(MatrixStack p_237838_1_)
-
drawDownloadSpeed0
private void drawDownloadSpeed0(MatrixStack p_237833_1_, long p_237833_2_)
-
downloadSave
private void downloadSave()
-
downloadCancelled
private void downloadCancelled()
-
-