Fix enchant cost not updating for 1.16.5

This commit is contained in:
alexcrea 2024-06-15 00:09:29 +02:00
parent 015c0ec5fe
commit b8bcf09df7
No known key found for this signature in database
GPG key ID: 43FD265DB0DBF91F

View file

@ -549,10 +549,12 @@ class AnvilEventListener(private val packetManager: PacketManager) : Listener {
else
{ ConfigOptions.maxAnvilCost + 1 }
val player = event.view.player
inventory.repairCost = finalAnvilCost
event.view.setProperty(REPAIR_COST, finalAnvilCost)
player.openInventory.setProperty(REPAIR_COST, finalAnvilCost)
val player = event.view.player
if(player is Player){
if(player.gameMode != GameMode.CREATIVE ){
val bypassToExpensive = (ConfigOptions.doReplaceTooExpensive) &&