From 8073dbec7a749ccb8e6c19a3595d3691888a2587 Mon Sep 17 00:00:00 2001 From: md_5 Date: Mon, 23 Dec 2019 13:14:11 +1100 Subject: [PATCH] SPIGOT-5474: Just ignore bugged fireball data --- nms-patches/EntityFireballFireball.patch | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 nms-patches/EntityFireballFireball.patch diff --git a/nms-patches/EntityFireballFireball.patch b/nms-patches/EntityFireballFireball.patch new file mode 100644 index 0000000000..652a80b547 --- /dev/null +++ b/nms-patches/EntityFireballFireball.patch @@ -0,0 +1,19 @@ +--- a/net/minecraft/server/EntityFireballFireball.java ++++ b/net/minecraft/server/EntityFireballFireball.java +@@ -18,7 +18,7 @@ + + public void b(ItemStack itemstack) { + if (itemstack.getItem() != Items.FIRE_CHARGE || itemstack.hasTag()) { +- this.getDataWatcher().set(EntityFireballFireball.f, SystemUtils.a((Object) itemstack.cloneItemStack(), (itemstack1) -> { ++ this.getDataWatcher().set(EntityFireballFireball.f, SystemUtils.a(itemstack.cloneItemStack(), (itemstack1) -> { // CraftBukkit - decompile error + itemstack1.setCount(1); + })); + } +@@ -50,6 +50,6 @@ + super.a(nbttagcompound); + ItemStack itemstack = ItemStack.a(nbttagcompound.getCompound("Item")); + +- this.b(itemstack); ++ if (!itemstack.isEmpty()) this.b(itemstack); // CraftBukkit - SPIGOT-5474 probably came from bugged earlier versions + } + }