13
0
geforkt von Mirrors/Paper

Use ItemStack.empty() when air is passed into constructor

Dieser Commit ist enthalten in:
Nassim Jahnke 2024-06-18 15:31:30 +02:00
Ursprung 8d4decb590
Commit 97bd52887e

Datei anzeigen

@ -89,7 +89,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
} }
- this.type = type; - this.type = type;
- this.amount = amount; - 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) { if (damage != 0) {
setDurability(damage); setDurability(damage);
} }