Proxy ItemStack to CraftItemStack

This commit is contained in:
Jake Potrebic
2024-05-14 11:57:43 -07:00
parent c3d1a03428
commit c441981c54
6 changed files with 150 additions and 50 deletions

View File

@@ -678,4 +678,16 @@ public class MaterialRerouting {
return itemStack.withType(material);
}
// Paper end - register paper API specific material consumers in rerouting
// Paper start - methods added post 1.13, no-op
@RerouteStatic("org/bukkit/inventory/ItemStack")
public static ItemStack of(final Material material) {
return ItemStack.of(material);
}
@RerouteStatic("org/bukkit/inventory/ItemStack")
public static ItemStack of(final Material material, final int amount) {
return ItemStack.of(material, amount);
}
// Paper end
}