23 lines
1.0 KiB
Diff
23 lines
1.0 KiB
Diff
From 2515940c05e1f56035eb8ffd09f9848faf312900 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
|
|
@@ -19,7 +19,7 @@ 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
|
|
}));
|
|
}
|
|
|
|
--
|
|
2.24.1
|
|
|