Update to Minecraft 1.18-pre5

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2021-11-22 09:00:00 +11:00
parent a852b81a69
commit 43702a9e10
700 changed files with 10286 additions and 10098 deletions

View File

@@ -1,19 +1,17 @@
--- a/net/minecraft/world/entity/projectile/EntityEnderSignal.java
+++ b/net/minecraft/world/entity/projectile/EntityEnderSignal.java
@@ -38,8 +38,8 @@
@@ -38,7 +38,7 @@
}
public void setItem(ItemStack itemstack) {
- if (!itemstack.a(Items.ENDER_EYE) || itemstack.hasTag()) {
- this.getDataWatcher().set(EntityEnderSignal.DATA_ITEM_STACK, (ItemStack) SystemUtils.a((Object) itemstack.cloneItemStack(), (itemstack1) -> {
+ if (true || !itemstack.a(Items.ENDER_EYE) || itemstack.hasTag()) { // CraftBukkit - always allow item changing
+ this.getDataWatcher().set(EntityEnderSignal.DATA_ITEM_STACK, (ItemStack) SystemUtils.a(itemstack.cloneItemStack(), (itemstack1) -> { // CraftBukkit - decompile error
- 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);
}));
}
@@ -182,7 +182,7 @@
public void loadData(NBTTagCompound nbttagcompound) {
ItemStack itemstack = ItemStack.a(nbttagcompound.getCompound("Item"));
public void readAdditionalSaveData(NBTTagCompound nbttagcompound) {
ItemStack itemstack = ItemStack.of(nbttagcompound.getCompound("Item"));
- this.setItem(itemstack);
+ if (!itemstack.isEmpty()) this.setItem(itemstack); // CraftBukkit - SPIGOT-6103 summon, see also SPIGOT-5474