From 152e0f26b5d93dbd4af06b92def789d9673cf550 Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Fri, 13 Dec 2019 15:55:19 +1100 Subject: [PATCH] SPIGOT-5449: Fix issue with projectiles By: md_5 --- .../nms-patches/EntityProjectileThrowable.patch | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 paper-server/nms-patches/EntityProjectileThrowable.patch diff --git a/paper-server/nms-patches/EntityProjectileThrowable.patch b/paper-server/nms-patches/EntityProjectileThrowable.patch new file mode 100644 index 0000000000..746440e7b0 --- /dev/null +++ b/paper-server/nms-patches/EntityProjectileThrowable.patch @@ -0,0 +1,13 @@ +--- a/net/minecraft/server/EntityProjectileThrowable.java ++++ b/net/minecraft/server/EntityProjectileThrowable.java +@@ -18,8 +18,8 @@ + + public void setItem(ItemStack itemstack) { + if (itemstack.getItem() != this.i() || itemstack.hasTag()) { +- this.getDataWatcher().set(EntityProjectileThrowable.e, SystemUtils.a((Object) itemstack.cloneItemStack(), (itemstack1) -> { +- itemstack1.setCount(1); ++ this.getDataWatcher().set(EntityProjectileThrowable.e, SystemUtils.a(itemstack.cloneItemStack(), (itemstack1) -> { // CraftBukkit - decompile error ++ if (!itemstack1.isEmpty()) itemstack1.setCount(1); // CraftBukkit + })); + } +