diff --git a/Spigot-Server-Patches/MC-Dev-fixes.patch b/Spigot-Server-Patches/MC-Dev-fixes.patch index b1442bbe0b..beb3747bf5 100644 --- a/Spigot-Server-Patches/MC-Dev-fixes.patch +++ b/Spigot-Server-Patches/MC-Dev-fixes.patch @@ -156,6 +156,19 @@ index f2c0e06ba..909d13c42 100644 } private EntityEnderDragon o() { +diff --git a/src/main/java/net/minecraft/server/EntityFireballFireball.java b/src/main/java/net/minecraft/server/EntityFireballFireball.java +index 8e28c4725..3988e68d4 100644 +--- a/src/main/java/net/minecraft/server/EntityFireballFireball.java ++++ b/src/main/java/net/minecraft/server/EntityFireballFireball.java +@@ -0,0 +0,0 @@ public abstract class EntityFireballFireball extends EntityFireball { + + 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) -> { // Paper - decompile fix + itemstack1.setCount(1); + })); + } diff --git a/src/main/java/net/minecraft/server/EntityVindicator.java b/src/main/java/net/minecraft/server/EntityVindicator.java index 7d44348c7..73ecdd22e 100644 --- a/src/main/java/net/minecraft/server/EntityVindicator.java diff --git a/Spigot-Server-Patches/Prevent-TRAP-while-loading-Fireballs.patch b/Spigot-Server-Patches/Prevent-TRAP-while-loading-Fireballs.patch new file mode 100644 index 0000000000..bc387c3159 --- /dev/null +++ b/Spigot-Server-Patches/Prevent-TRAP-while-loading-Fireballs.patch @@ -0,0 +1,20 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Shane Freeder +Date: Sat, 14 Dec 2019 01:10:45 +0000 +Subject: [PATCH] Prevent TRAP while loading Fireballs + + +diff --git a/src/main/java/net/minecraft/server/EntityFireballFireball.java b/src/main/java/net/minecraft/server/EntityFireballFireball.java +index 3988e68d4..a16b756a0 100644 +--- a/src/main/java/net/minecraft/server/EntityFireballFireball.java ++++ b/src/main/java/net/minecraft/server/EntityFireballFireball.java +@@ -0,0 +0,0 @@ public abstract class EntityFireballFireball extends EntityFireball { + public void b(ItemStack itemstack) { + if (itemstack.getItem() != Items.FIRE_CHARGE || itemstack.hasTag()) { + this.getDataWatcher().set(EntityFireballFireball.f, SystemUtils.a(itemstack.cloneItemStack(), (itemstack1) -> { // Paper - decompile fix +- itemstack1.setCount(1); ++ if(!itemstack1.isEmpty()) itemstack1.setCount(1); // Paper + })); + } + +-- \ No newline at end of file diff --git a/scripts/importmcdev.sh b/scripts/importmcdev.sh index 227a01eab8..08c66e8410 100755 --- a/scripts/importmcdev.sh +++ b/scripts/importmcdev.sh @@ -93,6 +93,7 @@ done # we do not need any lines added to this file for NMS # import FileName +import EntityFireballFireball