PaperMC/paper-server/nms-patches/net/minecraft/world/entity/projectile/EntityEnderSignal.patch

23 lines
1.1 KiB
Diff
Raw Normal View History

2021-03-15 23:00:00 +01:00
--- a/net/minecraft/world/entity/projectile/EntityEnderSignal.java
+++ b/net/minecraft/world/entity/projectile/EntityEnderSignal.java
@@ -39,8 +39,8 @@
}
public void setItem(ItemStack itemstack) {
- if (itemstack.getItem() != Items.ENDER_EYE || itemstack.hasTag()) {
- this.getDataWatcher().set(EntityEnderSignal.b, SystemUtils.a((Object) itemstack.cloneItemStack(), (itemstack1) -> {
+ if (true || itemstack.getItem() != Items.ENDER_EYE || itemstack.hasTag()) { // CraftBukkit - always allow item changing
+ this.getDataWatcher().set(EntityEnderSignal.b, SystemUtils.a(itemstack.cloneItemStack(), (itemstack1) -> { // CraftBukkit - decompile error
itemstack1.setCount(1);
}));
}
2021-03-15 23:00:00 +01:00
@@ -156,7 +156,7 @@
public void loadData(NBTTagCompound nbttagcompound) {
ItemStack itemstack = ItemStack.a(nbttagcompound.getCompound("Item"));
- this.setItem(itemstack);
+ if (!itemstack.isEmpty()) this.setItem(itemstack); // CraftBukkit - SPIGOT-6103 summon, see also SPIGOT-5474
}
@Override