PaperMC/paper-server/nms-patches/net/minecraft/world/entity/projectile/EntityFireballFireball.patch
CraftBukkit/Spigot b3a8254758 Update to Minecraft 1.17
By: md_5 <git@md-5.net>
2021-06-11 15:00:00 +10:00

19 lines
1,013 B
Diff

--- a/net/minecraft/world/entity/projectile/EntityFireballFireball.java
+++ b/net/minecraft/world/entity/projectile/EntityFireballFireball.java
@@ -29,7 +29,7 @@
public void setItem(ItemStack itemstack) {
if (!itemstack.a(Items.FIRE_CHARGE) || itemstack.hasTag()) {
- this.getDataWatcher().set(EntityFireballFireball.DATA_ITEM_STACK, (ItemStack) SystemUtils.a((Object) itemstack.cloneItemStack(), (itemstack1) -> {
+ this.getDataWatcher().set(EntityFireballFireball.DATA_ITEM_STACK, (ItemStack) SystemUtils.a(itemstack.cloneItemStack(), (itemstack1) -> { // CraftBukkit - decompile error
itemstack1.setCount(1);
}));
}
@@ -68,6 +68,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
}
}