SPIGOT-6103: Summoning an Eye of Ender throw an Error

This commit is contained in:
md_5 2020-08-26 18:20:19 +10:00
parent 9aafdc9a78
commit 0de8365ddf
No known key found for this signature in database
GPG Key ID: E8E901AC7C617C11
1 changed files with 20 additions and 0 deletions

View File

@ -0,0 +1,20 @@
--- a/net/minecraft/server/EntityEnderSignal.java
+++ b/net/minecraft/server/EntityEnderSignal.java
@@ -21,7 +21,7 @@
public void b(ItemStack itemstack) {
if (itemstack.getItem() != Items.ENDER_EYE || itemstack.hasTag()) {
- this.getDataWatcher().set(EntityEnderSignal.b, SystemUtils.a((Object) itemstack.cloneItemStack(), (itemstack1) -> {
+ this.getDataWatcher().set(EntityEnderSignal.b, SystemUtils.a(itemstack.cloneItemStack(), (itemstack1) -> { // CraftBukkit - decompile error
itemstack1.setCount(1);
}));
}
@@ -137,7 +137,7 @@
public void loadData(NBTTagCompound nbttagcompound) {
ItemStack itemstack = ItemStack.a(nbttagcompound.getCompound("Item"));
- this.b(itemstack);
+ if (!itemstack.isEmpty()) this.b(itemstack); // CraftBukkit - SPIGOT-6103 summon, see also SPIGOT-5474
}
@Override