mirror of
https://github.com/PaperMC/Paper.git
synced 2025-02-18 11:22:15 +01:00
Use ItemStack.empty() when air is passed into constructor
This commit is contained in:
parent
8d4decb590
commit
97bd52887e
1 changed files with 3 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue