From c2aefdc6ef4bc18dc2d64673e41717dfcb2b7f60 Mon Sep 17 00:00:00 2001 From: glitch Date: Sun, 13 Aug 2023 16:13:12 -0500 Subject: [PATCH] more mappings --- .../screen/world/CreateWorldScreen.mapping | 1 + .../pack/BuiltinResourcePackProvider.mapping | 1 + .../pack/FileResourcePackProvider.mapping | 5 ++++ .../resource/pack/PackDetector.mapping | 9 +++++++ .../resource/pack/ResourcePackProfile.mapping | 4 +-- .../net/minecraft/unmapped/C_dwkmbiso.mapping | 2 -- .../util/path/SymlinkValidator.mapping | 25 ++++++++++++++++++- 7 files changed, 42 insertions(+), 5 deletions(-) create mode 100644 mappings/net/minecraft/resource/pack/PackDetector.mapping delete mode 100644 mappings/net/minecraft/unmapped/C_dwkmbiso.mapping diff --git a/mappings/net/minecraft/client/gui/screen/world/CreateWorldScreen.mapping b/mappings/net/minecraft/client/gui/screen/world/CreateWorldScreen.mapping index b604e7db6f..3a0aa6f63e 100644 --- a/mappings/net/minecraft/client/gui/screen/world/CreateWorldScreen.mapping +++ b/mappings/net/minecraft/client/gui/screen/world/CreateWorldScreen.mapping @@ -22,6 +22,7 @@ CLASS net/minecraft/unmapped/C_ibkofvzc net/minecraft/client/gui/screen/world/Cr FIELD f_woybhigv dataPackTempDir Ljava/nio/file/Path; FIELD f_wuyzkrbd GAME_MODE Lnet/minecraft/unmapped/C_rdaqiwdt; FIELD f_xabhnhby grid Lnet/minecraft/unmapped/C_qykucwmu; + FIELD f_yednpqse linkValidator Lnet/minecraft/unmapped/C_jgxjjhjn; FIELD f_ztgjtcrr tabManager Lnet/minecraft/unmapped/C_shidhwhk; METHOD (Lnet/minecraft/unmapped/C_ayfeobid;Lnet/minecraft/unmapped/C_wrmtlwqx;Lnet/minecraft/unmapped/C_njsjipmy;Ljava/util/Optional;Ljava/util/OptionalLong;)V ARG 2 parent diff --git a/mappings/net/minecraft/resource/pack/BuiltinResourcePackProvider.mapping b/mappings/net/minecraft/resource/pack/BuiltinResourcePackProvider.mapping index 05dd265e24..6f1ba52dc0 100644 --- a/mappings/net/minecraft/resource/pack/BuiltinResourcePackProvider.mapping +++ b/mappings/net/minecraft/resource/pack/BuiltinResourcePackProvider.mapping @@ -15,6 +15,7 @@ CLASS net/minecraft/unmapped/C_lqaxxobw net/minecraft/resource/pack/BuiltinResou ARG 1 name ARG 2 factory ARG 3 displayName + METHOD m_nklharuz wrapToFactory (Lnet/minecraft/unmapped/C_tguinuvn;)Lnet/minecraft/unmapped/C_lvnjxuwi$C_dwhnbqlk; METHOD m_nptsmwiv (Lnet/minecraft/unmapped/C_lvnjxuwi$C_dwhnbqlk;Ljava/lang/String;)Lnet/minecraft/unmapped/C_lvnjxuwi; ARG 2 name METHOD m_pgtmuvzo getPackDisplayName (Ljava/lang/String;)Lnet/minecraft/unmapped/C_rdaqiwdt; diff --git a/mappings/net/minecraft/resource/pack/FileResourcePackProvider.mapping b/mappings/net/minecraft/resource/pack/FileResourcePackProvider.mapping index 4b6b8f379a..0421a7a51c 100644 --- a/mappings/net/minecraft/resource/pack/FileResourcePackProvider.mapping +++ b/mappings/net/minecraft/resource/pack/FileResourcePackProvider.mapping @@ -5,6 +5,7 @@ CLASS net/minecraft/unmapped/C_sxnlbpmz net/minecraft/resource/pack/FileResource FIELD f_rzlwntbb source Lnet/minecraft/unmapped/C_evnnymfu; METHOD m_rdcoaisk searchResourcePacks (Ljava/nio/file/Path;Lnet/minecraft/unmapped/C_jgxjjhjn;ZLjava/util/function/BiConsumer;)V ARG 0 packsFolder + ARG 1 linkValidator ARG 2 builtin ARG 3 packConsumer METHOD m_vdlrrjjc getResourcePackNameFromFile (Ljava/nio/file/Path;)Ljava/lang/String; @@ -12,3 +13,7 @@ CLASS net/minecraft/unmapped/C_sxnlbpmz net/minecraft/resource/pack/FileResource METHOD m_wzwvsvdv (Ljava/util/function/Consumer;Ljava/nio/file/Path;Lnet/minecraft/unmapped/C_lvnjxuwi$C_dwhnbqlk;)V ARG 2 packPath ARG 3 packFactory + CLASS C_pahuorni Detector + FIELD f_ihfafmbx builtin Z + METHOD (Lnet/minecraft/unmapped/C_jgxjjhjn;Z)V + ARG 1 linkValidator diff --git a/mappings/net/minecraft/resource/pack/PackDetector.mapping b/mappings/net/minecraft/resource/pack/PackDetector.mapping new file mode 100644 index 0000000000..f2d98d9680 --- /dev/null +++ b/mappings/net/minecraft/resource/pack/PackDetector.mapping @@ -0,0 +1,9 @@ +CLASS net/minecraft/unmapped/C_dwkmbiso net/minecraft/resource/pack/PackDetector + FIELD f_rtyclybi linkValidator Lnet/minecraft/unmapped/C_jgxjjhjn; + METHOD m_jdqwsamm createFromZip (Ljava/nio/file/Path;)Ljava/lang/Object; + ARG 1 path + METHOD m_kiilwusn detectPack (Ljava/nio/file/Path;Ljava/util/List;)Ljava/lang/Object; + ARG 1 candidate + ARG 2 foundForbiddenLinks + METHOD m_zlvguvti createFromDirectory (Ljava/nio/file/Path;)Ljava/lang/Object; + ARG 1 path diff --git a/mappings/net/minecraft/resource/pack/ResourcePackProfile.mapping b/mappings/net/minecraft/resource/pack/ResourcePackProfile.mapping index d828701bad..c3022c3a02 100644 --- a/mappings/net/minecraft/resource/pack/ResourcePackProfile.mapping +++ b/mappings/net/minecraft/resource/pack/ResourcePackProfile.mapping @@ -74,13 +74,13 @@ CLASS net/minecraft/unmapped/C_lvnjxuwi net/minecraft/resource/pack/ResourcePack ARG 7 source CLASS C_dwhnbqlk ResourcePackFactory METHOD m_juxacvht open (Ljava/lang/String;Lnet/minecraft/unmapped/C_lvnjxuwi$C_mowpzosc;)Lnet/minecraft/unmapped/C_tguinuvn; - COMMENT Open the primary resource pack and apply its overlays that support the current resource version. + COMMENT Opens the primary resource pack and apply its overlays that support the current resource version. COMMENT

COMMENT In practice, this usually means wrapping the resource pack and its overlays in a {@link CompositeResourcePack}. ARG 1 name ARG 2 info METHOD m_kokszcyq openPrimary (Ljava/lang/String;)Lnet/minecraft/unmapped/C_tguinuvn; - COMMENT Open the primary resource pack only, without any overlays applied. + COMMENT Opens the primary resource pack only, without any overlays applied. ARG 1 name CLASS C_mowpzosc Info METHOD m_scojbpqu getCompatibility ()Lnet/minecraft/unmapped/C_pchdyjmm; diff --git a/mappings/net/minecraft/unmapped/C_dwkmbiso.mapping b/mappings/net/minecraft/unmapped/C_dwkmbiso.mapping deleted file mode 100644 index 3e7ea73aa1..0000000000 --- a/mappings/net/minecraft/unmapped/C_dwkmbiso.mapping +++ /dev/null @@ -1,2 +0,0 @@ -CLASS net/minecraft/unmapped/C_dwkmbiso - FIELD f_rtyclybi linkValidator Lnet/minecraft/unmapped/C_jgxjjhjn; diff --git a/mappings/net/minecraft/util/path/SymlinkValidator.mapping b/mappings/net/minecraft/util/path/SymlinkValidator.mapping index 9f8fb5055f..baf5a8fa6a 100644 --- a/mappings/net/minecraft/util/path/SymlinkValidator.mapping +++ b/mappings/net/minecraft/util/path/SymlinkValidator.mapping @@ -1,5 +1,28 @@ CLASS net/minecraft/unmapped/C_jgxjjhjn net/minecraft/util/path/SymlinkValidator - FIELD f_svrtftfg pathMatcher Ljava/nio/file/PathMatcher; + FIELD f_svrtftfg allowedSymlinkMatcher Ljava/nio/file/PathMatcher; + METHOD m_euykifgm validateDirectory (Ljava/nio/file/Path;Z)Ljava/util/List; + COMMENT Validates a directory. + COMMENT

+ COMMENT If {@code validateContents} is true, then the directory's contents (but not the directory itself!) is inspected + COMMENT for forbidden symlinks. Pass {@code true} if you don't care if the passed directory is a symlink elsewhere, + COMMENT but do care about the contents of the directory being safe. For example, Minecraft doesn't care if a world + COMMENT folder is a symlink elsewhere, but the contents of the world cannot contain forbidden symlinks. + COMMENT

+ COMMENT If you only want to verify whether the directory itself is an allowed symlink, pass {@code false}. + COMMENT + COMMENT @param dir the dir to validate + COMMENT @param validateContents whether to validate the contents of the directory, or the directory itself. + COMMENT @return any forbidden symlinks + ARG 1 dir + ARG 2 validateContents + METHOD m_plelqbgv validateSymlink (Ljava/nio/file/Path;Ljava/util/List;)V + ARG 1 symlink + ARG 2 foundForbiddenLinks + METHOD m_wxpdofaa validateDirectoryContents (Ljava/nio/file/Path;Ljava/util/List;)V + ARG 1 dir + ARG 2 foundForbiddenLinks + METHOD m_ztjbybov validateSymlink (Ljava/nio/file/Path;)Ljava/util/List; + ARG 1 symlink CLASS C_redzjhyo METHOD m_snezytsc validateSymlink (Ljava/nio/file/Path;Ljava/nio/file/attribute/BasicFileAttributes;)V ARG 1 path