PaperMC/Spigot-Server-Patches/Prevent-TRAP-while-loading-Fireballs.patch
2019-12-14 01:11:59 +00:00

20 lines
No EOL
1 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com>
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
}));
}
--