From 52a49941da4625001a2896b7d419ad21448a93df Mon Sep 17 00:00:00 2001 From: Kyle Wood Date: Wed, 24 Nov 2021 03:25:37 -0600 Subject: [PATCH] Verify and fix build-data adjustments for 1.18 reobf --- .../additional-spigot-member-mappings.csrg | 7 ------- build-data/dev-imports.txt | 2 -- build-data/mappings-patch.tiny | 2 -- build-data/reobf-mappings-patch.tiny | 17 ++++++++--------- build.gradle.kts | 2 -- 5 files changed, 8 insertions(+), 22 deletions(-) delete mode 100644 build-data/additional-spigot-member-mappings.csrg diff --git a/build-data/additional-spigot-member-mappings.csrg b/build-data/additional-spigot-member-mappings.csrg deleted file mode 100644 index c6301f91b6..0000000000 --- a/build-data/additional-spigot-member-mappings.csrg +++ /dev/null @@ -1,7 +0,0 @@ -# CraftBukkit maps all of (mojmap names): -# Merchant.getLevel() -# Entity.getCommandSenderWorld() -# to getWorld(), which confuses our ability to map this method properly. This patch disambiguates it -# 1.18 todo: check these -#net/minecraft/world/item/trading/IMerchant fE ()Lnet/minecraft/world/level/World; getLevel -#net/minecraft/world/entity/npc/EntityVillagerAbstract fE ()Lnet/minecraft/world/level/World; getLevel diff --git a/build-data/dev-imports.txt b/build-data/dev-imports.txt index bed1af5647..b818b96e27 100644 --- a/build-data/dev-imports.txt +++ b/build-data/dev-imports.txt @@ -8,5 +8,3 @@ # To import classes from the vanilla Minecraft jar use `minecraft` as the artifactId: # minecraft net.minecraft.world.level.entity.LevelEntityGetterAdapter # minecraft net/minecraft/world/level/entity/LevelEntityGetter.java - - diff --git a/build-data/mappings-patch.tiny b/build-data/mappings-patch.tiny index a8d8c189af..14a2a3582a 100644 --- a/build-data/mappings-patch.tiny +++ b/build-data/mappings-patch.tiny @@ -1,7 +1,5 @@ tiny 2 0 spigot mojang+yarn -# 1.18 todo: check these - # Originally DistanceManager, which also implements DistanceManager, so clashes since the implemented class # is imported and not fully qualified. Easiest fix is to just change the name c net/minecraft/server/level/PlayerChunkMap$a net/minecraft/server/level/ChunkMap$ChunkDistanceManager diff --git a/build-data/reobf-mappings-patch.tiny b/build-data/reobf-mappings-patch.tiny index 9064425df0..67e82310b4 100644 --- a/build-data/reobf-mappings-patch.tiny +++ b/build-data/reobf-mappings-patch.tiny @@ -12,21 +12,20 @@ tiny 2 0 mojang+yarn spigot -# 1.18 todo: check these - # CraftBukkit changes type -#c net/minecraft/server/level/ServerLevel net/minecraft/server/level/WorldServer -# f Lnet/minecraft/world/level/storage/PrimaryLevelData; serverLevelData E +c net/minecraft/server/level/ServerLevel net/minecraft/server/level/WorldServer + f Lnet/minecraft/world/level/storage/PrimaryLevelData; serverLevelData N -#c net/minecraft/world/level/chunk/LevelChunk net/minecraft/world/level/chunk/Chunk -# f Lnet/minecraft/server/level/ServerLevel; level i +c net/minecraft/world/level/chunk/LevelChunk net/minecraft/world/level/chunk/Chunk + f Lnet/minecraft/server/level/ServerLevel; level q +# 1.18 todo: verify paper still changes this # Paper changes type -#c net/minecraft/core/MappedRegistry net/minecraft/core/RegistryMaterials -# f Lit/unimi/dsi/fastutil/objects/Reference2IntOpenHashMap; toId bw +c net/minecraft/core/MappedRegistry net/minecraft/core/RegistryMaterials + f Lit/unimi/dsi/fastutil/objects/Reference2IntOpenHashMap; toId bA # We add the getLevel method back to Hopper since mojang removed it - we need the method for hopper optimization # We add the method with this name to match the mojmap method of the same name in BlockEntity # Since we add the method we need to add the mapping for it so reobf works as expected c net/minecraft/world/level/block/entity/Hopper net/minecraft/world/level/block/entity/IHopper - m ()Lnet/minecraft/world/level/Level; getLevel k + m ()Lnet/minecraft/world/level/Level; getLevel W diff --git a/build.gradle.kts b/build.gradle.kts index 95b8082e4a..f67bc31eb9 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -67,8 +67,6 @@ paperweight { mappingsPatch.set(layout.projectDirectory.file("build-data/mappings-patch.tiny")) reobfMappingsPatch.set(layout.projectDirectory.file("build-data/reobf-mappings-patch.tiny")) - additionalSpigotMemberMappings.set(layout.projectDirectory.file("build-data/additional-spigot-member-mappings.csrg")) - reobfPackagesToFix.addAll( "co.aikar.timings", "com.destroystokyo.paper",