From 97bd52887ef5bbdbccb069ba2759bcd0529ccd3d Mon Sep 17 00:00:00 2001 From: Nassim Jahnke Date: Tue, 18 Jun 2024 15:31:30 +0200 Subject: [PATCH] Use ItemStack.empty() when air is passed into constructor --- patches/api/Proxy-ItemStack-to-CraftItemStack.patch | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/patches/api/Proxy-ItemStack-to-CraftItemStack.patch b/patches/api/Proxy-ItemStack-to-CraftItemStack.patch index 2f0df13ca8..59370f5889 100644 --- a/patches/api/Proxy-ItemStack-to-CraftItemStack.patch +++ b/patches/api/Proxy-ItemStack-to-CraftItemStack.patch @@ -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); }