mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-05 14:42:22 -07:00
Use ItemStack.empty() when air is passed into constructor
This commit is contained in:
@@ -89,7 +89,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
}
|
||||
- this.type = type;
|
||||
- this.amount = amount;
|
||||
+ this.craftDelegate = ItemStack.of(type, amount); // Paper - create delegate
|
||||
+ // Paper start - create delegate
|
||||
+ this.craftDelegate = type == Material.AIR ? ItemStack.empty() : ItemStack.of(type, amount);
|
||||
+ // Paper end - create delegate
|
||||
if (damage != 0) {
|
||||
setDurability(damage);
|
||||
}
|
||||
|
Reference in New Issue
Block a user