From 2d7d1de9c71c50c76fd059c3567ebaa7d22fae93 Mon Sep 17 00:00:00 2001 From: apple502j <33279053+apple502j@users.noreply.github.com> Date: Thu, 19 Sep 2024 03:03:44 +0900 Subject: [PATCH] Map realms --- .../screen/world/CreateWorldCallback.mapping | 2 +- .../client/realms/FileUpload.mapping | 6 +++++ .../client/realms/dto/RealmsServer.mapping | 2 +- .../screen/RealmsCreateRealmScreen.mapping | 11 ++++++++++ .../gui/screen/RealmsUploadScreen.mapping | 6 ++++- .../gui/screen/RealmsWorldCreating.mapping | 20 +++++++++++++++++ .../client/realms/util/RealmsUploader.mapping | 22 +++++++++++++++++++ .../realms/util/UploadCompressor.mapping | 18 +++++++++++++++ .../UploadProgress.mapping} | 7 +++++- .../realms/util/UploadProgressTracker.mapping | 6 +++++ .../{gui/screen => util}/UploadResult.mapping | 3 ++- 11 files changed, 98 insertions(+), 5 deletions(-) create mode 100644 mappings/net/minecraft/client/realms/gui/screen/RealmsWorldCreating.mapping create mode 100644 mappings/net/minecraft/client/realms/util/RealmsUploader.mapping create mode 100644 mappings/net/minecraft/client/realms/util/UploadCompressor.mapping rename mappings/net/minecraft/client/realms/{UploadStatus.mapping => util/UploadProgress.mapping} (60%) create mode 100644 mappings/net/minecraft/client/realms/util/UploadProgressTracker.mapping rename mappings/net/minecraft/client/realms/{gui/screen => util}/UploadResult.mapping (80%) diff --git a/mappings/net/minecraft/client/gui/screen/world/CreateWorldCallback.mapping b/mappings/net/minecraft/client/gui/screen/world/CreateWorldCallback.mapping index 9d7bd5d03e..6aa6278fc0 100644 --- a/mappings/net/minecraft/client/gui/screen/world/CreateWorldCallback.mapping +++ b/mappings/net/minecraft/client/gui/screen/world/CreateWorldCallback.mapping @@ -1,6 +1,6 @@ CLASS net/minecraft/class_10241 net/minecraft/client/gui/screen/world/CreateWorldCallback METHOD create (Lnet/minecraft/class_525;Lnet/minecraft/class_7780;Lnet/minecraft/class_31;Ljava/nio/file/Path;)Z ARG 1 screen - ARG 2 combinedDynamicRegistries + ARG 2 dynamicRegistries ARG 3 levelProperties ARG 4 dataPackTempDir diff --git a/mappings/net/minecraft/client/realms/FileUpload.mapping b/mappings/net/minecraft/client/realms/FileUpload.mapping index c4eb6562e9..925ea225ff 100644 --- a/mappings/net/minecraft/client/realms/FileUpload.mapping +++ b/mappings/net/minecraft/client/realms/FileUpload.mapping @@ -48,3 +48,9 @@ CLASS net/minecraft/class_4337 net/minecraft/client/realms/FileUpload FIELD field_19562 length J FIELD field_19563 content Ljava/io/InputStream; FIELD field_19564 uploadStatus Lnet/minecraft/class_4351; + METHOD (Lnet/minecraft/class_4337;Ljava/io/InputStream;JLnet/minecraft/class_4351;)V + ARG 2 content + ARG 3 length + ARG 5 uploadStatus + METHOD writeTo (Ljava/io/OutputStream;)V + ARG 1 stream diff --git a/mappings/net/minecraft/client/realms/dto/RealmsServer.mapping b/mappings/net/minecraft/client/realms/dto/RealmsServer.mapping index 67c3906788..eb8e11dc71 100644 --- a/mappings/net/minecraft/client/realms/dto/RealmsServer.mapping +++ b/mappings/net/minecraft/client/realms/dto/RealmsServer.mapping @@ -60,7 +60,7 @@ CLASS net/minecraft/class_4877 net/minecraft/client/realms/dto/RealmsServer METHOD method_54365 needsDowngrade ()Z METHOD method_54366 getCompatibility (Ljava/lang/String;)Lnet/minecraft/class_4877$class_8842; ARG 0 compatibility - METHOD method_54367 hasParentWorld ()Z + METHOD method_54367 isPrerelease ()Z METHOD method_60315 isMinigame ()Z CLASS class_4319 McoServerComparator FIELD field_19432 refOwner Ljava/lang/String; diff --git a/mappings/net/minecraft/client/realms/gui/screen/RealmsCreateRealmScreen.mapping b/mappings/net/minecraft/client/realms/gui/screen/RealmsCreateRealmScreen.mapping index c7960e3169..f9d5e22262 100644 --- a/mappings/net/minecraft/client/realms/gui/screen/RealmsCreateRealmScreen.mapping +++ b/mappings/net/minecraft/client/realms/gui/screen/RealmsCreateRealmScreen.mapping @@ -9,8 +9,11 @@ CLASS net/minecraft/class_4390 net/minecraft/client/realms/gui/screen/RealmsCrea FIELD field_46706 TITLE_TEXT Lnet/minecraft/class_2561; METHOD (Lnet/minecraft/class_4325;Lnet/minecraft/class_4877;Z)V ARG 1 parent + ARG 2 server + ARG 3 prerelease METHOD method_21245 createWorld (Lnet/minecraft/class_4877;Z)V ARG 1 realmsServer + ARG 2 prerelease METHOD method_52665 (Lnet/minecraft/class_4390;Lnet/minecraft/class_364;)V ARG 1 child METHOD method_52666 (Lnet/minecraft/class_4185;)V @@ -19,3 +22,11 @@ CLASS net/minecraft/class_4390 net/minecraft/client/realms/gui/screen/RealmsCrea ARG 1 name METHOD method_54374 (Lnet/minecraft/class_4185;)V ARG 1 button + METHOD method_64357 createPrereleaseServer (Lnet/minecraft/class_4877;)Lnet/minecraft/class_4877; + ARG 0 parent + METHOD method_64358 (Ljava/lang/Throwable;)Ljava/lang/Void; + ARG 1 throwable + METHOD method_64360 (Ljava/util/concurrent/atomic/AtomicBoolean;Lnet/minecraft/class_4877;)V + ARG 2 prereleaseServer + METHOD method_64361 createWorld (Lnet/minecraft/class_4877;)V + ARG 1 server diff --git a/mappings/net/minecraft/client/realms/gui/screen/RealmsUploadScreen.mapping b/mappings/net/minecraft/client/realms/gui/screen/RealmsUploadScreen.mapping index 2e38df13b8..059d109c95 100644 --- a/mappings/net/minecraft/client/realms/gui/screen/RealmsUploadScreen.mapping +++ b/mappings/net/minecraft/client/realms/gui/screen/RealmsUploadScreen.mapping @@ -3,7 +3,7 @@ CLASS net/minecraft/class_4427 net/minecraft/client/realms/gui/screen/RealmsUplo FIELD field_20176 selectedLevel Lnet/minecraft/class_34; FIELD field_20177 worldId J FIELD field_20178 slotId I - FIELD field_20179 uploadStatus Lnet/minecraft/class_4351; + FIELD field_20179 uploadProgress Lnet/minecraft/class_4351; FIELD field_20180 narrationRateLimiter Lcom/google/common/util/concurrent/RateLimiter; FIELD field_20182 status Lnet/minecraft/class_2561; FIELD field_20183 progress Ljava/lang/String; @@ -19,6 +19,7 @@ CLASS net/minecraft/class_4427 net/minecraft/client/realms/gui/screen/RealmsUplo FIELD field_26526 VERIFYING_TEXT Lnet/minecraft/class_2561; FIELD field_48388 creationTask Lnet/minecraft/class_4445; FIELD field_48389 layout Lnet/minecraft/class_8132; + FIELD field_54387 uploader Ljava/util/concurrent/atomic/AtomicReference; METHOD (Lnet/minecraft/class_4445;JILnet/minecraft/class_4410;Lnet/minecraft/class_34;)V ARG 1 creationTask ARG 2 worldId @@ -44,3 +45,6 @@ CLASS net/minecraft/class_4427 net/minecraft/client/realms/gui/screen/RealmsUplo METHOD method_37014 getNarration ()Lnet/minecraft/class_2561; METHOD method_56133 (Lnet/minecraft/class_4427;Lnet/minecraft/class_364;)V ARG 1 child + METHOD method_64364 (Ljava/lang/Object;Ljava/lang/Throwable;)Ljava/lang/Object; + ARG 1 v + ARG 2 throwable diff --git a/mappings/net/minecraft/client/realms/gui/screen/RealmsWorldCreating.mapping b/mappings/net/minecraft/client/realms/gui/screen/RealmsWorldCreating.mapping new file mode 100644 index 0000000000..2d1765f4ba --- /dev/null +++ b/mappings/net/minecraft/client/realms/gui/screen/RealmsWorldCreating.mapping @@ -0,0 +1,20 @@ +CLASS net/minecraft/class_10231 net/minecraft/client/realms/gui/screen/RealmsWorldCreating + FIELD field_54364 LOGGER Lorg/slf4j/Logger; + METHOD method_64334 (Lnet/minecraft/class_310;Lnet/minecraft/class_437;Lnet/minecraft/class_4877;Lnet/minecraft/class_4445;Lnet/minecraft/class_437;Lnet/minecraft/class_525;Lnet/minecraft/class_7780;Lnet/minecraft/class_31;Ljava/nio/file/Path;)Z + ARG 5 screen + ARG 6 dynamicRegistries + ARG 7 levelProperties + ARG 8 dataPackTempDir + METHOD method_64335 showCreateWorldScreen (Lnet/minecraft/class_310;Lnet/minecraft/class_437;Lnet/minecraft/class_437;Lnet/minecraft/class_4877;Lnet/minecraft/class_4445;)V + ARG 0 client + ARG 1 parent + ARG 2 realmsScreen + ARG 3 server + ARG 4 creationTask + METHOD method_64336 (Lnet/minecraft/class_310;Lnet/minecraft/class_437;Lnet/minecraft/class_437;Lnet/minecraft/class_4883;Lnet/minecraft/class_4445;Lnet/minecraft/class_4877;Ljava/lang/Object;Ljava/lang/Throwable;)Ljava/lang/Object; + ARG 6 v + ARG 7 throwable + METHOD method_64337 saveTempWorld (Lnet/minecraft/class_7780;Lnet/minecraft/class_31;Ljava/nio/file/Path;)Ljava/nio/file/Path; + ARG 0 dynamicRegistries + ARG 1 levelProperties + ARG 2 dataPackTempDir diff --git a/mappings/net/minecraft/client/realms/util/RealmsUploader.mapping b/mappings/net/minecraft/client/realms/util/RealmsUploader.mapping new file mode 100644 index 0000000000..ea3479f56a --- /dev/null +++ b/mappings/net/minecraft/client/realms/util/RealmsUploader.mapping @@ -0,0 +1,22 @@ +CLASS net/minecraft/class_10238 net/minecraft/client/realms/util/RealmsUploader + FIELD field_54372 MAX_ATTEMPTS I + FIELD field_54373 LOGGER Lorg/slf4j/Logger; + FIELD field_54374 client Lnet/minecraft/class_4341; + FIELD field_54375 directory Ljava/nio/file/Path; + FIELD field_54376 options Lnet/minecraft/class_4883; + FIELD field_54377 session Lnet/minecraft/class_320; + FIELD field_54378 worldId J + FIELD field_54379 slotId I + FIELD field_54380 progressTracker Lnet/minecraft/class_10239; + FIELD field_54381 cancelled Z + FIELD field_54382 upload Lnet/minecraft/class_4337; + METHOD (Ljava/nio/file/Path;Lnet/minecraft/class_4883;Lnet/minecraft/class_320;JILnet/minecraft/class_10239;)V + ARG 1 directory + ARG 2 options + ARG 3 session + ARG 4 worldId + ARG 6 slotId + ARG 7 progressTracker + METHOD method_64344 upload ()Ljava/util/concurrent/CompletableFuture; + METHOD method_64345 cancel ()V + METHOD method_64346 uploadSync ()Lnet/minecraft/class_4888; diff --git a/mappings/net/minecraft/client/realms/util/UploadCompressor.mapping b/mappings/net/minecraft/client/realms/util/UploadCompressor.mapping new file mode 100644 index 0000000000..47792dcfe0 --- /dev/null +++ b/mappings/net/minecraft/client/realms/util/UploadCompressor.mapping @@ -0,0 +1,18 @@ +CLASS net/minecraft/class_10237 net/minecraft/client/realms/util/UploadCompressor + FIELD field_54368 MAX_SIZE J + FIELD field_54370 cancellationSupplier Ljava/util/function/BooleanSupplier; + FIELD field_54371 directory Ljava/nio/file/Path; + METHOD (Ljava/nio/file/Path;Ljava/util/function/BooleanSupplier;)V + ARG 1 directory + ARG 2 cancellationSupplier + METHOD method_64340 run ()Ljava/io/File; + METHOD method_64341 validateSize (J)V + ARG 1 size + METHOD method_64342 compress (Ljava/nio/file/Path;Ljava/util/function/BooleanSupplier;)Ljava/io/File; + ARG 0 directory + ARG 1 cancellationSupplier + METHOD method_64343 compress (Lorg/apache/commons/compress/archivers/tar/TarArchiveOutputStream;Ljava/nio/file/Path;Ljava/lang/String;Z)V + ARG 1 stream + ARG 2 directory + ARG 3 prefix + ARG 4 root diff --git a/mappings/net/minecraft/client/realms/UploadStatus.mapping b/mappings/net/minecraft/client/realms/util/UploadProgress.mapping similarity index 60% rename from mappings/net/minecraft/client/realms/UploadStatus.mapping rename to mappings/net/minecraft/client/realms/util/UploadProgress.mapping index 23b247cef1..351ea6f18e 100644 --- a/mappings/net/minecraft/client/realms/UploadStatus.mapping +++ b/mappings/net/minecraft/client/realms/util/UploadProgress.mapping @@ -1,6 +1,9 @@ -CLASS net/minecraft/class_4351 net/minecraft/client/realms/UploadStatus +CLASS net/minecraft/class_4351 net/minecraft/client/realms/util/UploadProgress FIELD field_19601 bytesWritten J FIELD field_19602 totalBytes J + FIELD field_54361 startTimeMs J + FIELD field_54362 lastBytesWritten J + FIELD field_54363 bytesPerSecond J METHOD method_64325 getTotalBytes ()J METHOD method_64326 setTotalBytes (J)V ARG 1 totalBytes @@ -10,3 +13,5 @@ CLASS net/minecraft/class_4351 net/minecraft/client/realms/UploadStatus METHOD method_64329 hasWrittenBytes ()Z METHOD method_64330 hasWrittenAllBytes ()Z METHOD method_64331 getFractionBytesWritten ()D + METHOD method_64332 tick ()V + METHOD method_64333 getBytesPerSecond ()J diff --git a/mappings/net/minecraft/client/realms/util/UploadProgressTracker.mapping b/mappings/net/minecraft/client/realms/util/UploadProgressTracker.mapping new file mode 100644 index 0000000000..e282f8ef8b --- /dev/null +++ b/mappings/net/minecraft/client/realms/util/UploadProgressTracker.mapping @@ -0,0 +1,6 @@ +CLASS net/minecraft/class_10239 net/minecraft/client/realms/util/UploadProgressTracker + METHOD method_64349 getUploadProgress ()Lnet/minecraft/class_4351; + METHOD method_64350 updateProgressDisplay ()V + METHOD method_64351 create ()Lnet/minecraft/class_10239; + CLASS 1 + FIELD field_54383 progress Lnet/minecraft/class_4351; diff --git a/mappings/net/minecraft/client/realms/gui/screen/UploadResult.mapping b/mappings/net/minecraft/client/realms/util/UploadResult.mapping similarity index 80% rename from mappings/net/minecraft/client/realms/gui/screen/UploadResult.mapping rename to mappings/net/minecraft/client/realms/util/UploadResult.mapping index fdd9a76381..f9d395968d 100644 --- a/mappings/net/minecraft/client/realms/gui/screen/UploadResult.mapping +++ b/mappings/net/minecraft/client/realms/util/UploadResult.mapping @@ -1,9 +1,10 @@ -CLASS net/minecraft/class_4429 net/minecraft/client/realms/gui/screen/UploadResult +CLASS net/minecraft/class_4429 net/minecraft/client/realms/util/UploadResult FIELD field_20205 statusCode I FIELD field_20206 errorMessage Ljava/lang/String; METHOD (ILjava/lang/String;)V ARG 1 statusCode ARG 2 errorMessage + METHOD method_64365 getErrorMessage ()Ljava/lang/String; CLASS class_4430 Builder FIELD field_20207 statusCode I FIELD field_20208 errorMessage Ljava/lang/String;