From 3933b98a6032f061fc4232c151cef81881cfbd04 Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Thu, 25 Jun 2020 20:03:30 +1000 Subject: [PATCH] Fix 1.16 binary mappings not applying to modern plugins By: md_5 --- .../bukkit/craftbukkit/util/Commodore.java | 40 +++++++++---------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/util/Commodore.java b/paper-server/src/main/java/org/bukkit/craftbukkit/util/Commodore.java index ce57078117..ac48431777 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/util/Commodore.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/util/Commodore.java @@ -139,6 +139,26 @@ public class Commodore @Override public void visitFieldInsn(int opcode, String owner, String name, String desc) { + if ( owner.equals( "org/bukkit/block/Biome" ) ) + { + switch ( name ) + { + case "NETHER": + super.visitFieldInsn( opcode, owner, "NETHER_WASTES", desc ); + return; + } + } + + if ( owner.equals( "org/bukkit/entity/EntityType" ) ) + { + switch ( name ) + { + case "PIG_ZOMBIE": + super.visitFieldInsn( opcode, owner, "ZOMBIFIED_PIGLIN", desc ); + return; + } + } + if ( modern ) { if ( owner.equals( "org/bukkit/Material" ) ) @@ -219,26 +239,6 @@ public class Commodore } } - if ( owner.equals( "org/bukkit/block/Biome" ) ) - { - switch ( name ) - { - case "NETHER": - super.visitFieldInsn( opcode, owner, "NETHER_WASTES", desc ); - return; - } - } - - if ( owner.equals( "org/bukkit/entity/EntityType" ) ) - { - switch ( name ) - { - case "PIG_ZOMBIE": - super.visitFieldInsn( opcode, owner, "ZOMBIFIED_PIGLIN", desc ); - return; - } - } - super.visitFieldInsn( opcode, owner, name, desc ); }