Archiviert
13
0
Dieses Repository wurde am 2024-12-25 archiviert. Du kannst Dateien ansehen und es klonen, aber nicht pushen oder Issues/Pull-Requests öffnen.
Paper-Old/Spigot-Server-Patches/0413-Prevent-TRAP-while-loading-Fireballs.patch

23 Zeilen
1.0 KiB
Diff

From a8eee874aed5c9b5fde29bbb0ad160be44953d10 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 3988e68d4f..a16b756a05 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