SPIGOT-6686: Changes in MaximumRepairCost for Anvil Rename cause inconsistency

This commit is contained in:
DerFrZocker 2021-08-27 19:14:09 +10:00 committed by md_5
parent a0a37f416c
commit 3a9561bf24
No known key found for this signature in database
GPG Key ID: E8E901AC7C617C11

View File

@ -73,16 +73,17 @@
itemstack1 = ItemStack.EMPTY;
}
@@ -276,7 +284,7 @@
@@ -276,7 +284,8 @@
EnchantmentManager.a(map, itemstack1);
}
- this.resultSlots.setItem(0, itemstack1);
+ org.bukkit.craftbukkit.event.CraftEventFactory.callPrepareAnvilEvent(getBukkitView(), itemstack1); // CraftBukkit
+ updateInventory(); // CraftBukkit - SPIGOT-6686: Always send completed inventory to stay in sync with client
this.d();
}
}
@@ -303,4 +311,18 @@
@@ -303,4 +312,18 @@
public int m() {
return this.cost.get();
}