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

By: DerFrZocker <derrieple@gmail.com>
This commit is contained in:
CraftBukkit/Spigot 2021-08-27 19:14:09 +10:00
parent 8a60b49a31
commit dd503b542b

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();
}