3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-21 05:50:05 +01:00
Paper/nms-patches/EntityEnderSignal.patch

23 Zeilen
1.0 KiB
Diff

--- a/net/minecraft/server/EntityEnderSignal.java
+++ b/net/minecraft/server/EntityEnderSignal.java
2020-08-28 04:35:14 +02:00
@@ -20,8 +20,8 @@
}
public void b(ItemStack itemstack) {
2020-08-28 04:35:14 +02:00
- if (itemstack.getItem() != Items.ENDER_EYE || itemstack.hasTag()) {
- this.getDataWatcher().set(EntityEnderSignal.b, SystemUtils.a((Object) itemstack.cloneItemStack(), (itemstack1) -> {
2020-08-28 04:35:14 +02:00
+ 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);
}));
}
@@ -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