@Environment(value=CLIENT) public class RealmsUploadScreen extends RealmsScreen
| Modifier and Type | Field and Description |
|---|---|
private int |
animTick |
private ButtonWidget |
backButton |
private long |
bytesPersSecond |
private ButtonWidget |
cancelButton |
private boolean |
cancelled |
private static String[] |
DOTS |
private Text[] |
field_20503 |
private Runnable |
field_22728 |
private static Text |
field_26526 |
private static Logger |
LOGGER |
private RateLimiter |
narrationRateLimiter |
private RealmsResetWorldScreen |
parent |
private Long |
previousTimeSnapshot |
private Long |
previousWrittenBytes |
private String |
progress |
private LevelSummary |
selectedLevel |
private boolean |
showDots |
private int |
slotId |
private Text |
status |
private static ReentrantLock |
UPLOAD_LOCK |
private boolean |
uploadFinished |
private boolean |
uploadStarted |
private UploadStatus |
uploadStatus |
private long |
worldId |
buttons, children, client, height, itemRenderer, passEvents, textRenderer, title, widthGUI_ICONS_TEXTURE, OPTIONS_BACKGROUND_TEXTURE, STATS_ICON_TEXTURE| Constructor and Description |
|---|
RealmsUploadScreen(long worldId,
int slotId,
RealmsResetWorldScreen parent,
LevelSummary levelSummary,
Runnable runnable) |
| Modifier and Type | Method and Description |
|---|---|
private void |
addFileToTarGz(TarArchiveOutputStream tOut,
String path,
String base,
boolean root) |
private void |
drawDots(MatrixStack matrixStack) |
private void |
drawProgressBar(MatrixStack matrixStack) |
private void |
drawUploadSpeed(MatrixStack matrixStack) |
private void |
drawUploadSpeed0(MatrixStack matrixStack,
long long2) |
void |
init()
Called when a screen should be initialized.
|
boolean |
keyPressed(int keyCode,
int scanCode,
int modifiers)
Callback for when a key down event has been captured.
|
private void |
method_27460(Text[] text) |
private void |
onBack() |
private void |
onCancel() |
void |
removed() |
void |
render(MatrixStack matrices,
int mouseX,
int mouseY,
float delta) |
private File |
tarGzipArchive(File pathToDirectoryFile) |
void |
tick() |
private void |
upload() |
private void |
uploadCancelled() |
private boolean |
verify(File archive) |
narrateLabels, rowaddButton, 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, wrapScreenErrorgetFocused, isDragging, setDragging, setFocuseddrawCenteredString, drawCenteredText, drawHorizontalLine, drawSprite, drawStringWithShadow, drawTexture, drawTexture, drawTexture, drawTexture, drawTextWithShadow, drawVerticalLine, fill, fillGradient, fillGradient, getZOffset, method_29343, setZOffsetclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitchangeFocus, charTyped, focusOn, hoveredElement, keyReleased, mouseClicked, mouseDragged, mouseReleased, mouseScrolled, setInitialFocusmouseMovedprivate static final Logger LOGGER
private static final ReentrantLock UPLOAD_LOCK
private static final String[] DOTS
private static final Text field_26526
private final RealmsResetWorldScreen parent
private final LevelSummary selectedLevel
private final long worldId
private final int slotId
private final UploadStatus uploadStatus
private final RateLimiter narrationRateLimiter
private volatile Text[] field_20503
private volatile Text status
private volatile String progress
private volatile boolean cancelled
private volatile boolean uploadFinished
private volatile boolean showDots
private volatile boolean uploadStarted
private ButtonWidget backButton
private ButtonWidget cancelButton
private int animTick
private Long previousWrittenBytes
private Long previousTimeSnapshot
private long bytesPersSecond
private final Runnable field_22728
public RealmsUploadScreen(long worldId,
int slotId,
RealmsResetWorldScreen parent,
LevelSummary levelSummary,
Runnable runnable)
public void init()
This method is called when this screen is opened or resized.
private void onBack()
private void onCancel()
public boolean keyPressed(int keyCode,
int scanCode,
int modifiers)
GLFW class.keyPressed in interface ElementkeyPressed in interface ParentElementkeyPressed in class ScreenkeyCode - the named key code of the event as described in the GLFW classscanCode - the unique/platform-specific scan code of the keyboard inputmodifiers - a GLFW bitfield describing the modifier keys that are held down (see GLFW Modifier key flags)true to indicate that the event handling is successful/validKeyboard.onKey(long, int, int, int, int),
GLFW.GLFW_KEY_Q,
GLFWKeyCallbackI.invoke(long, int, int, int, int)public void render(MatrixStack matrices, int mouseX, int mouseY, float delta)
private void drawDots(MatrixStack matrixStack)
private void drawProgressBar(MatrixStack matrixStack)
private void drawUploadSpeed(MatrixStack matrixStack)
private void drawUploadSpeed0(MatrixStack matrixStack, long long2)
public void tick()
tick in interface TickableElementtick in class RealmsScreenprivate void upload()
private void method_27460(Text[] text)
private void uploadCancelled()
private boolean verify(File archive)
private File tarGzipArchive(File pathToDirectoryFile) throws IOException
IOExceptionprivate void addFileToTarGz(TarArchiveOutputStream tOut, String path, String base, boolean root) throws IOException
IOException