13
0
geforkt von Mirrors/Paper

Fix 1.16 binary mappings not applying to modern plugins

By: md_5 <git@md-5.net>
Dieser Commit ist enthalten in:
CraftBukkit/Spigot 2020-06-25 20:03:30 +10:00
Ursprung 27d67a7a4e
Commit 3933b98a60

Datei anzeigen

@ -139,6 +139,26 @@ public class Commodore
@Override @Override
public void visitFieldInsn(int opcode, String owner, String name, String desc) 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 ( modern )
{ {
if ( owner.equals( "org/bukkit/Material" ) ) 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 ); super.visitFieldInsn( opcode, owner, name, desc );
} }