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
d846ce51d8
commit
6f077a576b
1 changed files with 8 additions and 1 deletions
|
|
@ -243,6 +243,8 @@ class AnvilResultListener : Listener {
|
||||||
|
|
||||||
player.updateInventory()
|
player.updateInventory()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
handleAnvilMechanic(player, view)
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -355,7 +357,7 @@ class AnvilResultListener : Listener {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (event.click != ClickType.MIDDLE)
|
if (event.click != ClickType.MIDDLE)
|
||||||
handleAnvilMechanic(player, view, player.gameMode != GameMode.CREATIVE)
|
handleAnvilMechanic(player, view)
|
||||||
|
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
@ -384,6 +386,11 @@ class AnvilResultListener : Listener {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Process both sound & degradation
|
||||||
|
private fun handleAnvilMechanic(player: HumanEntity, view: AnvilView) {
|
||||||
|
return handleAnvilMechanic(player, view, player.gameMode != GameMode.CREATIVE)
|
||||||
|
}
|
||||||
|
|
||||||
// Process both sound & degradation
|
// Process both sound & degradation
|
||||||
private fun handleAnvilMechanic(player: HumanEntity, view: AnvilView, canDegrade: Boolean) {
|
private fun handleAnvilMechanic(player: HumanEntity, view: AnvilView, 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