mirror of
https://github.com/alexcrea/CustomAnvil.git
synced 2026-08-28 08:25:56 +02:00
fix anvil degradation not working for
This commit is contained in:
parent
c117357202
commit
b2567f9176
1 changed files with 8 additions and 1 deletions
|
|
@ -247,6 +247,8 @@ class AnvilResultListener : Listener {
|
||||||
|
|
||||||
player.updateInventory()
|
player.updateInventory()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
handleAnvilMechanic(player, inventory)
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -359,7 +361,7 @@ class AnvilResultListener : Listener {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (event.click != ClickType.MIDDLE)
|
if (event.click != ClickType.MIDDLE)
|
||||||
handleAnvilMechanic(player, inventory, player.gameMode != GameMode.CREATIVE)
|
handleAnvilMechanic(player, inventory)
|
||||||
|
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
@ -388,6 +390,11 @@ class AnvilResultListener : Listener {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Process both sound & degradation
|
||||||
|
private fun handleAnvilMechanic(player: HumanEntity, inventory: AnvilInventory) {
|
||||||
|
return handleAnvilMechanic(player, inventory, player.gameMode != GameMode.CREATIVE)
|
||||||
|
}
|
||||||
|
|
||||||
// Process both sound & degradation
|
// Process both sound & degradation
|
||||||
private fun handleAnvilMechanic(player: HumanEntity, inventory: AnvilInventory, canDegrade: Boolean) {
|
private fun handleAnvilMechanic(player: HumanEntity, inventory: AnvilInventory, canDegrade: Boolean) {
|
||||||
// ok so we do not provide a getLocation on view ?
|
// ok so we do not provide a getLocation on view ?
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue