mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-03 05:32:18 -07:00
Fixes for cb pkg ver
This commit is contained in:
@@ -39,9 +39,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ // Paper start - ItemFactory#getSpawnEgg (paper had original method that returned ItemStack, upstream added identical but returned Material)
|
||||
+ if (owner.equals("org/bukkit/inventory/ItemFactory") && name.equals("getSpawnEgg") && desc.equals("(Lorg/bukkit/entity/EntityType;)Lorg/bukkit/inventory/ItemStack;")) {
|
||||
+ super.visitInsn(Opcodes.SWAP); // has 1 param, this moves the owner instance to the top for the checkcast
|
||||
+ super.visitTypeInsn(Opcodes.CHECKCAST, CB_PACKAGE_PREFIX + "inventory/CraftItemFactory");
|
||||
+ super.visitTypeInsn(Opcodes.CHECKCAST, runtimeCbPkgPrefix() + "inventory/CraftItemFactory");
|
||||
+ super.visitInsn(Opcodes.SWAP); // moves param back to the the top of stack
|
||||
+ super.visitMethodInsn(Opcodes.INVOKEVIRTUAL, CB_PACKAGE_PREFIX + "inventory/CraftItemFactory", "getSpawnEgg0", desc, false);
|
||||
+ super.visitMethodInsn(Opcodes.INVOKEVIRTUAL, runtimeCbPkgPrefix() + "inventory/CraftItemFactory", "getSpawnEgg0", desc, false);
|
||||
+ return;
|
||||
+ }
|
||||
+ // Paper end - ItemFactory#getSpawnEgg
|
||||
|
Reference in New Issue
Block a user