Verify and fix build-data adjustments for 1.18 reobf

This commit is contained in:
Kyle Wood 2021-11-24 03:25:37 -06:00 committed by MiniDigger | Martin
parent 8f64c190ef
commit 1ac7223aae
5 changed files with 8 additions and 22 deletions

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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",