craftbukkit/nms-patches/net/minecraft/world/entity/projectile/EntityEnderSignal.patch

21 lines
948 B
Diff
Raw Normal View History

2021-03-16 09:00:00 +11:00
--- a/net/minecraft/world/entity/projectile/EntityEnderSignal.java
+++ b/net/minecraft/world/entity/projectile/EntityEnderSignal.java
2021-11-22 09:00:00 +11:00
@@ -38,7 +38,7 @@
2020-08-28 12:35:14 +10:00
}
2020-09-11 07:00:00 +10:00
public void setItem(ItemStack itemstack) {
2021-11-22 09:00:00 +11:00
- if (!itemstack.is(Items.ENDER_EYE) || itemstack.hasTag()) {
+ if (true || !itemstack.is(Items.ENDER_EYE) || itemstack.hasTag()) { // CraftBukkit - always allow item changing
this.getEntityData().set(EntityEnderSignal.DATA_ITEM_STACK, (ItemStack) SystemUtils.make(itemstack.copy(), (itemstack1) -> {
itemstack1.setCount(1);
}));
2021-06-11 15:00:00 +10:00
@@ -182,7 +182,7 @@
2021-11-22 09:00:00 +11:00
public void readAdditionalSaveData(NBTTagCompound nbttagcompound) {
ItemStack itemstack = ItemStack.of(nbttagcompound.getCompound("Item"));
2020-09-11 07:00:00 +10:00
- this.setItem(itemstack);
+ if (!itemstack.isEmpty()) this.setItem(itemstack); // CraftBukkit - SPIGOT-6103 summon, see also SPIGOT-5474
}
@Override