Class RealmsDownloadLatestWorldScreen
java.lang.Object
net.minecraft.client.gui.components.events.AbstractContainerEventHandler
net.minecraft.client.gui.screens.Screen
net.minecraft.realms.RealmsScreen
com.mojang.realmsclient.gui.screens.RealmsDownloadLatestWorldScreen
- All Implemented Interfaces:
ContainerEventHandler, GuiEventListener, Renderable, TabOrderedElement
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class Screen
Screen.NarratableSearchResult -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intprivate static final intprivate static final intprivate static final intprivate static final intprivate longprivate final it.unimi.dsi.fastutil.booleans.BooleanConsumerprivate Buttonprivate booleanprivate booleanprivate intprivate static final String[]private static final ReentrantLockprivate final RealmsDownloadLatestWorldScreen.DownloadStatusprivate final Componentprivate @Nullable Componentprivate booleanprivate booleanprivate final Screenprivate static final org.slf4j.Loggerprivate final com.google.common.util.concurrent.RateLimiterprivate @Nullable Longprivate @Nullable Longprivate @Nullable Stringprivate booleanprivate Componentprivate final WorldDownloadprivate final StringFields inherited from class RealmsScreen
COLOR_DARK_GRAY, COLOR_GREEN, COLOR_LINK, COLOR_LINK_HOVER, EXPIRATION_NOTIFICATION_DAYS, HARDCORE_HEART_SIZE, LOGO_HEIGHT, LOGO_LOCATION, LOGO_TEXTURE_HEIGHT, LOGO_TEXTURE_WIDTH, LOGO_WIDTH, SIZE_LIMIT, SKIN_FACE_SIZE, TITLE_HEIGHTFields inherited from class Screen
FADE_IN_TIME, font, FOOTER_SEPARATOR, HEADER_SEPARATOR, height, INWORLD_FOOTER_SEPARATOR, INWORLD_HEADER_SEPARATOR, MENU_BACKGROUND, minecraft, narratorButton, renderables, screenExecutor, title, width -
Constructor Summary
ConstructorsConstructorDescriptionRealmsDownloadLatestWorldScreen(Screen lastScreen, WorldDownload worldDownload, String worldName, it.unimi.dsi.fastutil.booleans.BooleanConsumer callback) -
Method Summary
Modifier and TypeMethodDescriptionprivate voidprivate Componentprivate voidprivate voidprivate voidextractDots(GuiGraphicsExtractor graphics) private voidextractDownloadSpeed(GuiGraphicsExtractor graphics) private voidextractDownloadSpeed0(GuiGraphicsExtractor graphics, long bytesPerSecond) private voidextractProgressBar(GuiGraphicsExtractor graphics) voidextractRenderState(GuiGraphicsExtractor graphics, int xm, int ym, float a) private longgetContentLength(String downloadLink) voidinit()voidonClose()voidtick()Methods inherited from class RealmsScreen
realmsLogo, rowMethods inherited from class Screen
added, addRenderableOnly, addRenderableWidget, addWidget, afterKeyboardAction, afterMouseAction, afterMouseMove, canInterruptWithAnotherScreen, changeFocus, children, clearFocus, clearWidgets, clickCommandAction, clickUrlAction, defaultHandleClickEvent, defaultHandleGameClickEvent, extractBackground, extractBlurredBackground, extractMenuBackground, extractMenuBackground, extractMenuBackgroundTexture, extractPanorama, extractRenderStateWithTooltipAndSubtitles, extractTransparentBackground, fadeWidgets, fillCrashDetails, findNarratableWidget, getBackgroundMusic, getFont, getMinecraft, getNarrationMessage, getRectangle, getTitle, getTooltipFromItem, getUsageNarration, handleDelayedNarration, init, insertText, isAllowedInPortal, isInGameUi, isMouseOver, isPauseScreen, isValidCharacterForName, keyPressed, onFilesDrop, panoramaShouldSpin, rebuildWidgets, removed, removeWidget, repositionElements, resize, setInitialFocus, setInitialFocus, shouldCloseOnEsc, shouldNarrateNavigation, showsActiveEffects, triggerImmediateNarration, updateNarratedWidget, updateNarrationState, updateNarratorStatusMethods inherited from class AbstractContainerEventHandler
getFocused, isDragging, setDragging, setFocusedMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ContainerEventHandler
charTyped, getBorderForArrowNavigation, getChildAt, getCurrentFocusPath, isFocused, keyReleased, mouseClicked, mouseDragged, mouseReleased, mouseScrolled, nextFocusPath, preeditUpdated, setFocusedMethods inherited from interface GuiEventListener
mouseMoved, shouldTakeFocusAfterInteractionMethods inherited from interface TabOrderedElement
getTabOrderGroup
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
DOWNLOAD_LOCK
-
BAR_WIDTH
private static final int BAR_WIDTH- See Also:
-
BAR_TOP
private static final int BAR_TOP- See Also:
-
BAR_BOTTOM
private static final int BAR_BOTTOM- See Also:
-
BAR_BORDER
private static final int BAR_BORDER- See Also:
-
lastScreen
-
worldDownload
-
downloadTitle
-
narrationRateLimiter
private final com.google.common.util.concurrent.RateLimiter narrationRateLimiter -
cancelButton
-
worldName
-
downloadStatus
-
errorMessage
-
status
-
progress
-
cancelled
private volatile boolean cancelled -
showDots
private volatile boolean showDots -
finished
private volatile boolean finished -
extracting
private volatile boolean extracting -
previousWrittenBytes
-
previousTimeSnapshot
-
bytesPersSecond
private long bytesPersSecond -
animTick
private int animTick -
DOTS
-
dotIndex
private int dotIndex -
checked
private boolean checked -
callback
private final it.unimi.dsi.fastutil.booleans.BooleanConsumer callback
-
-
Constructor Details
-
RealmsDownloadLatestWorldScreen
public RealmsDownloadLatestWorldScreen(Screen lastScreen, WorldDownload worldDownload, String worldName, it.unimi.dsi.fastutil.booleans.BooleanConsumer callback)
-
-
Method Details
-
init
-
checkDownloadSize
private void checkDownloadSize() -
getContentLength
-
tick
-
createProgressNarrationMessage
-
onClose
-
extractRenderState
- Specified by:
extractRenderStatein interfaceRenderable- Overrides:
extractRenderStatein classScreen
-
extractDots
-
extractProgressBar
-
extractDownloadSpeed
-
extractDownloadSpeed0
-
downloadSave
private void downloadSave() -
downloadCancelled
private void downloadCancelled()
-