@@ -1,10 +1,16 @@
|
||||
--- a/net/minecraft/world/entity/projectile/EntityFireballFireball.java
|
||||
+++ b/net/minecraft/world/entity/projectile/EntityFireballFireball.java
|
||||
@@ -65,6 +65,6 @@
|
||||
@@ -56,7 +56,12 @@
|
||||
public void readAdditionalSaveData(NBTTagCompound nbttagcompound) {
|
||||
super.readAdditionalSaveData(nbttagcompound);
|
||||
ItemStack itemstack = ItemStack.of(nbttagcompound.getCompound("Item"));
|
||||
|
||||
- this.setItem(itemstack);
|
||||
+ if (!itemstack.isEmpty()) this.setItem(itemstack); // CraftBukkit - SPIGOT-5474 probably came from bugged earlier versions
|
||||
}
|
||||
}
|
||||
if (nbttagcompound.contains("Item", 10)) {
|
||||
- this.setItem((ItemStack) ItemStack.parse(this.registryAccess(), nbttagcompound.getCompound("Item")).orElse(this.getDefaultItem()));
|
||||
+ // CraftBukkit start - SPIGOT-5474 probably came from bugged earlier versions
|
||||
+ ItemStack itemstack = (ItemStack) ItemStack.parse(this.registryAccess(), nbttagcompound.getCompound("Item")).orElse(this.getDefaultItem());
|
||||
+ if (!itemstack.isEmpty()) {
|
||||
+ this.setItem(itemstack);
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
} else {
|
||||
this.setItem(this.getDefaultItem());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user