3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-15 12:30:06 +01:00
Paper/nms-patches/EntityFireballFireball.patch
2020-06-25 10:00:00 +10:00

20 Zeilen
936 B
Diff

--- a/net/minecraft/server/EntityFireballFireball.java
+++ b/net/minecraft/server/EntityFireballFireball.java
@@ -18,7 +18,7 @@
public void setItem(ItemStack itemstack) {
if (itemstack.getItem() != Items.FIRE_CHARGE || itemstack.hasTag()) {
- this.getDataWatcher().set(EntityFireballFireball.e, SystemUtils.a((Object) itemstack.cloneItemStack(), (itemstack1) -> {
+ this.getDataWatcher().set(EntityFireballFireball.e, SystemUtils.a(itemstack.cloneItemStack(), (itemstack1) -> { // CraftBukkit - decompile error
itemstack1.setCount(1);
}));
}
@@ -50,6 +50,6 @@
super.loadData(nbttagcompound);
ItemStack itemstack = ItemStack.a(nbttagcompound.getCompound("Item"));
- this.setItem(itemstack);
+ if (!itemstack.isEmpty()) this.setItem(itemstack); // CraftBukkit - SPIGOT-5474 probably came from bugged earlier versions
}
}