Skip to content

Commit

Permalink
1.20.3-pre1 server resource pack (#3736)
Browse files Browse the repository at this point in the history
  • Loading branch information
apple502j authored Nov 21, 2023
1 parent a474dec commit 77699ef
Show file tree
Hide file tree
Showing 22 changed files with 323 additions and 25 deletions.
3 changes: 2 additions & 1 deletion mappings/net/minecraft/client/MinecraftClient.mapping
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ CLASS net/minecraft/class_310 net/minecraft/client/MinecraftClient
FIELD field_39770 messageHandler Lnet/minecraft/class_7594;
FIELD field_39924 advanceValidatingTextRenderer Lnet/minecraft/class_327;
FIELD field_40380 defaultResourcePack Lnet/minecraft/class_3268;
FIELD field_40381 serverResourcePackProvider Lnet/minecraft/class_1066;
FIELD field_40381 serverResourcePackLoader Lnet/minecraft/class_1066;
FIELD field_41331 telemetryManager Lnet/minecraft/class_6628;
FIELD field_41332 renderTime J
FIELD field_41782 navigationType Lnet/minecraft/class_8015;
Expand Down Expand Up @@ -547,6 +547,7 @@ CLASS net/minecraft/class_310 net/minecraft/client/MinecraftClient
ARG 1 crashReport
METHOD method_54785 getTargetMillisPerTick (F)F
ARG 1 millis
METHOD method_55505 onDisconnected ()V
CLASS class_5859 ChatRestriction
COMMENT Represents the restrictions on chat on a Minecraft client.
COMMENT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,6 @@ CLASS net/minecraft/class_412 net/minecraft/client/gui/screen/multiplayer/Connec
ARG 2 address
ARG 3 info
ARG 4 quickPlay
CLASS 1
METHOD method_55509 toAcceptanceStatus (Lnet/minecraft/class_642$class_643;)Lnet/minecraft/class_9044$class_9047;
ARG 0 policy
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,15 @@ CLASS net/minecraft/class_8673 net/minecraft/client/network/ClientCommonNetworkH
ARG 1 registryRef
ARG 2 tags
METHOD method_52772 (Lnet/minecraft/class_437;Ljava/util/UUID;Ljava/net/URL;Ljava/lang/String;ZZ)V
ARG 5 confirmed
ARG 6 confirmed
METHOD method_52773 getParsedResourcePackUrl (Ljava/lang/String;)Ljava/net/URL;
ARG 0 url
METHOD method_52775 showPackConfirmationScreen (Ljava/util/UUID;Ljava/net/URL;Ljava/lang/String;ZLnet/minecraft/class_2561;)V
ARG 1 id
ARG 2 url
ARG 3 hash
ARG 4 required
ARG 5 prompt
METHOD method_52778 getPrompt (Lnet/minecraft/class_2561;Lnet/minecraft/class_2561;)Lnet/minecraft/class_2561;
ARG 0 requirementPrompt
ARG 1 customPrompt
Expand All @@ -36,4 +41,6 @@ CLASS net/minecraft/class_8673 net/minecraft/client/network/ClientCommonNetworkH
ARG 1 packet
METHOD method_52789 sendQueuedPackets ()V
METHOD method_52790 getBrand ()Ljava/lang/String;
METHOD method_55511 (Ljava/util/UUID;)V
ARG 1 id
CLASS class_8137 QueuedPacket
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ CLASS net/minecraft/class_4439 net/minecraft/client/realms/task/RealmsPrepareCon
FIELD field_20225 lastScreen Lnet/minecraft/class_437;
FIELD field_36356 LOGGER Lorg/slf4j/Logger;
FIELD field_46135 TITLE Lnet/minecraft/class_2561;
FIELD field_47580 APPLYING_PACK_TEXT Lnet/minecraft/class_2561;
FIELD field_47581 REALMS_PACK_ID Ljava/util/UUID;
METHOD <init> (Lnet/minecraft/class_437;Lnet/minecraft/class_4877;)V
ARG 1 lastScreen
ARG 2 server
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
CLASS net/minecraft/class_9038 net/minecraft/client/resource/server/DownloadQueuer
METHOD method_55546 enqueue (Ljava/util/Map;Ljava/util/function/Consumer;)V
ARG 1 entries
ARG 2 callback
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
CLASS net/minecraft/class_9039 net/minecraft/client/resource/server/PackStateChangeCallback
METHOD sendResponse (Ljava/util/UUID;Lnet/minecraft/class_9039$class_9040;)V
ARG 1 id
ARG 2 state
CLASS class_9040 State
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
CLASS net/minecraft/class_9041 net/minecraft/client/resource/server/ReloadScheduler
METHOD scheduleReload (Lnet/minecraft/class_9041$class_9042;)V
ARG 1 context
CLASS class_9042 ReloadContext
METHOD method_55549 onSuccess ()V
METHOD method_55550 onFailure (Z)V
ARG 1 force
METHOD method_55551 getPacks ()Ljava/util/List;
CLASS class_9043 PackInfo
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
CLASS net/minecraft/class_1066 net/minecraft/client/resource/server/ServerResourcePackLoader
FIELD field_40562 SERVER_NAME_TEXT Lnet/minecraft/class_2561;
FIELD field_47593 NOOP_PROVIDER Lnet/minecraft/class_3285;
FIELD field_47594 DEBUG_PACK_STATE_CHANGE_CALLBACK Lnet/minecraft/class_9039;
FIELD field_47595 client Lnet/minecraft/class_310;
FIELD field_47596 packProvider Lnet/minecraft/class_3285;
FIELD field_47597 reloadContext Lnet/minecraft/class_9041$class_9042;
FIELD field_47598 manager Lnet/minecraft/class_9044;
FIELD field_47599 downloader Lnet/minecraft/class_9028;
FIELD field_47600 packSource Lnet/minecraft/class_5352;
FIELD field_47601 packStateChangeCallback Lnet/minecraft/class_9039;
FIELD field_5296 SHA1_PATTERN Ljava/util/regex/Pattern;
FIELD field_5298 LOGGER Lorg/slf4j/Logger;
METHOD <init> (Lnet/minecraft/class_310;Ljava/nio/file/Path;Lnet/minecraft/class_542$class_547;)V
ARG 1 client
ARG 2 downloadsDirectory
ARG 3 runArgs
METHOD method_55514 getPassthroughPackProvider ()Lnet/minecraft/class_3285;
METHOD method_55515 createListener (I)Lnet/minecraft/class_3521$class_9034;
ARG 1 entryCount
METHOD method_55516 createDownloadQueuer (Lnet/minecraft/class_9028;Ljava/util/concurrent/Executor;Lnet/minecraft/class_320;Ljava/net/Proxy;)Lnet/minecraft/class_9038;
ARG 1 downloader
ARG 2 executor
ARG 3 session
ARG 4 proxy
METHOD method_55517 reload (Lnet/minecraft/class_9041$class_9042;)V
ARG 1 context
METHOD method_55518 toHashCode (Ljava/lang/String;)Lcom/google/common/hash/HashCode;
ARG 0 hash
METHOD method_55519 toProfiles (Ljava/util/List;)Ljava/util/List;
ARG 1 packs
METHOD method_55520 remove (Ljava/util/UUID;)V
ARG 1 id
METHOD method_55521 (Ljava/util/UUID;Lnet/minecraft/class_9039$class_9040;)V
ARG 1 id
ARG 2 state
METHOD method_55522 (Ljava/util/UUID;Lnet/minecraft/class_9039;Ljava/util/concurrent/CompletableFuture;Ljava/util/UUID;Lnet/minecraft/class_9039$class_9040;)V
ARG 4 id
ARG 5 state
METHOD method_55523 addResourcePack (Ljava/util/UUID;Ljava/net/URL;Ljava/lang/String;)V
ARG 1 id
ARG 2 url
ARG 3 hash
METHOD method_55524 addResourcePack (Ljava/util/UUID;Ljava/nio/file/Path;)V
ARG 1 id
ARG 2 path
METHOD method_55525 createPackChangeCallback (Ljava/util/concurrent/Executor;)Ljava/lang/Runnable;
ARG 1 executor
METHOD method_55526 (Ljava/util/function/Consumer;)V
ARG 1 packAdder
METHOD method_55527 getStateChangeCallback (Lnet/minecraft/class_2535;)Lnet/minecraft/class_9039;
ARG 0 connection
METHOD method_55528 init (Lnet/minecraft/class_2535;Lnet/minecraft/class_9044$class_9047;)V
ARG 1 connection
ARG 2 acceptanceStatus
METHOD method_55529 (Lnet/minecraft/class_2535;Ljava/util/UUID;Lnet/minecraft/class_9039$class_9040;)V
ARG 1 id
ARG 2 state
METHOD method_55530 onReloadFailure ()V
METHOD method_55531 getPackProvider (Ljava/util/List;)Lnet/minecraft/class_3285;
ARG 0 serverPacks
METHOD method_55532 getPackLoadFuture (Ljava/util/UUID;)Ljava/util/concurrent/CompletableFuture;
ARG 1 expectedId
METHOD method_55533 (Ljava/util/UUID;Lnet/minecraft/class_9039$class_9040;)V
ARG 0 id
ARG 1 state
METHOD method_55534 (Ljava/util/function/Consumer;)V
ARG 0 profileAdder
METHOD method_55535 onForcedReloadFailure ()V
METHOD method_55536 onReloadSuccess ()V
METHOD method_55537 removeAll ()V
METHOD method_55538 initWorldPack ()V
METHOD method_55539 acceptAll ()V
METHOD method_55540 declineAll ()V
METHOD method_55541 clear ()V
METHOD method_55542 getReloadScheduler ()Lnet/minecraft/class_9041;
CLASS 1
FIELD field_47604 toastType Lnet/minecraft/class_370$class_9037;
FIELD field_47605 toastTitle Lnet/minecraft/class_2561;
FIELD field_47606 toastDescription Lnet/minecraft/class_2561;
FIELD field_47607 current I
FIELD field_47608 contentLength Ljava/util/OptionalLong;
METHOD method_55543 showProgress (J)V
ARG 1 writtenBytes
METHOD method_55544 showToast ()V
CLASS 2
FIELD field_47614 MAX_BYTES I
FIELD field_47615 SHA1 Lcom/google/common/hash/HashFunction;
METHOD method_55545 getHeaders ()Ljava/util/Map;
CLASS 3
FIELD field_47618 currentlyRunning Z
FIELD field_47619 shouldKeepRunning Z
METHOD method_55547 runOnExecutor ()V
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
CLASS net/minecraft/class_9044 net/minecraft/client/resource/server/ServerResourcePackManager
FIELD field_47629 queuer Lnet/minecraft/class_9038;
FIELD field_47630 stateChangeCallback Lnet/minecraft/class_9039;
FIELD field_47631 reloadScheduler Lnet/minecraft/class_9041;
FIELD field_47632 packChangeCallback Ljava/lang/Runnable;
FIELD field_47633 acceptanceStatus Lnet/minecraft/class_9044$class_9047;
FIELD field_47634 packs Ljava/util/List;
METHOD <init> (Lnet/minecraft/class_9038;Lnet/minecraft/class_9039;Lnet/minecraft/class_9041;Ljava/lang/Runnable;Lnet/minecraft/class_9044$class_9047;)V
ARG 1 queuer
ARG 2 stateChangeCallback
ARG 3 reloadScheduler
ARG 4 packChangeCallback
ARG 5 acceptanceStatus
METHOD method_55552 removeAll ()V
METHOD method_55553 accept (Lnet/minecraft/class_9044$class_9049;)V
ARG 1 pack
METHOD method_55554 onDownload (Ljava/util/Collection;Lnet/minecraft/class_9028$class_9030;)V
ARG 1 packs
ARG 2 result
METHOD method_55555 (Ljava/util/List;Lnet/minecraft/class_9028$class_9030;)V
ARG 2 result
METHOD method_55556 remove (Ljava/util/UUID;)V
ARG 1 id
METHOD method_55557 onAdd (Ljava/util/UUID;Lnet/minecraft/class_9044$class_9049;)V
ARG 1 id
ARG 2 pack
METHOD method_55558 addResourcePack (Ljava/util/UUID;Ljava/net/URL;Lcom/google/common/hash/HashCode;)V
ARG 1 id
ARG 2 url
ARG 3 hashCode
METHOD method_55559 addResourcePack (Ljava/util/UUID;Ljava/nio/file/Path;)V
ARG 1 id
ARG 2 path
METHOD method_55560 acceptAll ()V
METHOD method_55561 (Lnet/minecraft/class_9044$class_9049;)Z
ARG 1 pack
METHOD method_55562 markReplaced (Ljava/util/UUID;)V
ARG 1 id
METHOD method_55563 declineAll ()V
METHOD method_55564 get (Ljava/util/UUID;)Lnet/minecraft/class_9044$class_9049;
ARG 1 id
METHOD method_55565 resetAcceptanceStatus ()V
METHOD method_55566 update ()V
METHOD method_55567 onPackChanged ()V
METHOD method_55568 removeInactivePacks ()V
METHOD method_55569 enqueueDownloads ()Z
METHOD method_55570 applyDownloadedPacks ()V
CLASS 1
METHOD method_55571 (Lnet/minecraft/class_9044$class_9049;)Lnet/minecraft/class_9041$class_9043;
ARG 0 pack
CLASS class_9045 Status
CLASS class_9046 LoadStatus
CLASS class_9047 AcceptanceStatus
CLASS class_9048 DiscardReason
FIELD field_47657 state Lnet/minecraft/class_9039$class_9040;
METHOD <init> (Ljava/lang/String;ILnet/minecraft/class_9039$class_9040;)V
ARG 3 state
CLASS class_9049 PackEntry
FIELD field_47659 id Ljava/util/UUID;
FIELD field_47660 url Ljava/net/URL;
FIELD field_47661 hashCode Lcom/google/common/hash/HashCode;
FIELD field_47662 path Ljava/nio/file/Path;
FIELD field_47663 discardReason Lnet/minecraft/class_9044$class_9048;
FIELD field_47664 loadStatus Lnet/minecraft/class_9044$class_9046;
FIELD field_47665 status Lnet/minecraft/class_9044$class_9045;
FIELD field_47666 accepted Z
METHOD <init> (Ljava/util/UUID;Ljava/net/URL;Lcom/google/common/hash/HashCode;)V
ARG 1 id
ARG 2 url
ARG 3 hashCode
METHOD method_55576 isDiscarded ()Z
METHOD method_55577 discard (Lnet/minecraft/class_9044$class_9048;)V
ARG 1 reason
10 changes: 0 additions & 10 deletions mappings/net/minecraft/client/util/NetworkUtils.mapping

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ CLASS net/minecraft/class_8705 net/minecraft/network/listener/ClientCommonPacket
ARG 1 packet
METHOD method_52784 onResourcePackSend (Lnet/minecraft/class_2720;)V
ARG 1 packet
METHOD method_55512 onResourcePackRemove (Lnet/minecraft/class_9053;)V
ARG 1 packet
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
CLASS net/minecraft/class_9053 net/minecraft/network/packet/s2c/common/ResourcePackRemoveS2CPacket
METHOD <init> (Lnet/minecraft/class_2540;)V
ARG 1 buf
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
CLASS net/minecraft/class_2720 net/minecraft/network/packet/s2c/common/ResourcePackSendS2CPacket
FIELD comp_2159 url Ljava/lang/String;
FIELD comp_2160 hash Ljava/lang/String;
FIELD comp_2161 required Z
FIELD comp_2162 prompt Lnet/minecraft/class_2561;
FIELD field_33340 MAX_HASH_LENGTH I
METHOD <init> (Lnet/minecraft/class_2540;)V
ARG 1 buf
METHOD comp_2159 url ()Ljava/lang/String;
METHOD comp_2160 hash ()Ljava/lang/String;
METHOD comp_2161 required ()Z
METHOD comp_2162 prompt ()Lnet/minecraft/class_2561;
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ CLASS net/minecraft/class_2170 net/minecraft/server/command/CommandManager
FIELD field_9832 dispatcher Lcom/mojang/brigadier/CommandDispatcher;
FIELD field_9833 LOGGER Lorg/slf4j/Logger;
METHOD <init> (Lnet/minecraft/class_2170$class_5364;Lnet/minecraft/class_7157;)V
ARG 1 environment
ARG 2 commandRegistryAccess
METHOD method_23917 getException (Lcom/mojang/brigadier/ParseResults;)Lcom/mojang/brigadier/exceptions/CommandSyntaxException;
ARG 0 parse
Expand Down
26 changes: 26 additions & 0 deletions mappings/net/minecraft/server/command/ServerPackCommand.mapping
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
CLASS net/minecraft/class_9027 net/minecraft/server/command/ServerPackCommand
METHOD method_55474 register (Lcom/mojang/brigadier/CommandDispatcher;)V
ARG 0 dispatcher
METHOD method_55475 (Lcom/mojang/brigadier/context/CommandContext;)I
ARG 0 context
METHOD method_55476 (Lnet/minecraft/class_2168;)Z
ARG 0 source
METHOD method_55477 executePush (Lnet/minecraft/class_2168;Ljava/lang/String;Ljava/util/Optional;Ljava/util/Optional;)I
ARG 0 source
ARG 1 url
ARG 2 uuid
ARG 3 hash
METHOD method_55478 executePop (Lnet/minecraft/class_2168;Ljava/util/UUID;)I
ARG 0 source
ARG 1 uuid
METHOD method_55479 sendToAll (Lnet/minecraft/class_2168;Lnet/minecraft/class_2596;)V
ARG 0 source
ARG 1 packet
METHOD method_55481 (Lnet/minecraft/class_2596;Lnet/minecraft/class_2535;)V
ARG 1 connection
METHOD method_55482 (Lcom/mojang/brigadier/context/CommandContext;)I
ARG 0 context
METHOD method_55483 (Lcom/mojang/brigadier/context/CommandContext;)I
ARG 0 context
METHOD method_55484 (Lcom/mojang/brigadier/context/CommandContext;)I
ARG 0 context
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,12 @@ CLASS net/minecraft/class_3806 net/minecraft/server/dedicated/ServerPropertiesHa
METHOD method_41186 (Ljava/lang/String;)Lcom/google/gson/JsonObject;
ARG 0 generatorSettings
METHOD method_43660 getServerResourcePackProperties (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ZLjava/lang/String;)Ljava/util/Optional;
ARG 0 id
ARG 1 url
ARG 2 sha1
ARG 3 hash
ARG 4 required
ARG 5 prompt
METHOD method_43661 parseResourcePackPrompt (Ljava/lang/String;)Lnet/minecraft/class_2561;
ARG 0 prompt
METHOD method_45157 createDimensionsRegistryHolder (Lnet/minecraft/class_5455;)Lnet/minecraft/class_7723;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ CLASS net/minecraft/class_7196 net/minecraft/server/integrated/IntegratedServerL
FIELD field_37913 LOGGER Lorg/slf4j/Logger;
FIELD field_37914 client Lnet/minecraft/class_310;
FIELD field_37915 storage Lnet/minecraft/class_32;
FIELD field_47592 WORLD_PACK_ID Ljava/util/UUID;
METHOD <init> (Lnet/minecraft/class_310;Lnet/minecraft/class_32;)V
ARG 1 client
ARG 2 storage
Expand Down Expand Up @@ -51,6 +52,8 @@ CLASS net/minecraft/class_7196 net/minecraft/server/integrated/IntegratedServerL
ARG 1 levelProperties
ARG 2 safeMode
ARG 3 dataPackManager
METHOD method_54611 (Lnet/minecraft/class_32$class_5143;Lnet/minecraft/class_3283;Lnet/minecraft/class_6904;Lnet/minecraft/class_1066;Ljava/lang/Runnable;Ljava/lang/Boolean;)V
ARG 6 confirmed
METHOD method_54612 (Lnet/minecraft/class_32$class_5143;Lcom/mojang/serialization/Dynamic;Ljava/lang/Runnable;ZZ)V
ARG 4 backup
ARG 5 eraseCache
Expand Down Expand Up @@ -79,6 +82,9 @@ CLASS net/minecraft/class_7196 net/minecraft/server/integrated/IntegratedServerL
ARG 1 context
METHOD method_54625 (Ljava/lang/Throwable;)Ljava/util/concurrent/CompletionStage;
ARG 1 throwable
METHOD method_55510 applyWorldPack (Lnet/minecraft/class_1066;Lnet/minecraft/class_32$class_5143;)Ljava/util/concurrent/CompletableFuture;
ARG 1 loader
ARG 2 session
CLASS class_7750 CurrentSettings
FIELD comp_1031 levelInfo Lnet/minecraft/class_1940;
FIELD comp_1033 existingDimensionRegistry Lnet/minecraft/class_2378;
Expand Down
29 changes: 29 additions & 0 deletions mappings/net/minecraft/util/Downloader.mapping
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
CLASS net/minecraft/class_9028 net/minecraft/util/Downloader
FIELD field_47572 LOGGER Lorg/slf4j/Logger;
FIELD field_47573 directory Ljava/nio/file/Path;
FIELD field_47574 logWriter Lnet/minecraft/class_7935;
FIELD field_47575 executor Lnet/minecraft/class_3846;
METHOD <init> (Ljava/nio/file/Path;)V
ARG 1 directory
METHOD method_55485 (Lnet/minecraft/class_9028$class_9029;Lnet/minecraft/class_9028$class_9030;Ljava/util/UUID;Lnet/minecraft/class_9028$class_9031;)V
ARG 3 id
ARG 4 entry
METHOD method_55486 downloadAsync (Lnet/minecraft/class_9028$class_9029;Ljava/util/Map;)Ljava/util/concurrent/CompletableFuture;
ARG 1 config
ARG 2 entries
METHOD method_55487 getFileInfo (Ljava/nio/file/Path;)Lcom/mojang/datafixers/util/Either;
ARG 1 path
METHOD method_55488 download (Lnet/minecraft/class_9028$class_9029;Ljava/util/Map;)Lnet/minecraft/class_9028$class_9030;
ARG 1 config
ARG 2 entries
CLASS class_9029 Config
CLASS class_9030 DownloadResult
CLASS class_9031 DownloadEntry
CLASS class_9032 FileInfo
FIELD field_47576 CODEC Lcom/mojang/serialization/Codec;
METHOD method_55490 (Lcom/mojang/serialization/codecs/RecordCodecBuilder$Instance;)Lcom/mojang/datafixers/kinds/App;
ARG 0 instance
CLASS class_9033 LogEntry
FIELD field_47577 CODEC Lcom/mojang/serialization/Codec;
METHOD method_55491 (Lcom/mojang/serialization/codecs/RecordCodecBuilder$Instance;)Lcom/mojang/datafixers/kinds/App;
ARG 0 instance
Loading

0 comments on commit 77699ef

Please sign in to comment.