2019-12-16 02:58:10 +00:00
|
|
|
From e6d8c07d576607a1caa436219801345fd4667c24 Mon Sep 17 00:00:00 2001
|
2019-12-14 01:11:59 +00:00
|
|
|
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
|
2019-12-16 02:47:23 +00:00
|
|
|
index 3988e68d4f..a16b756a05 100644
|
2019-12-14 01:11:59 +00:00
|
|
|
--- 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
|
|
|
|
|