Ignore slotsChanged when removing exopack menu

This commit is contained in:
DBotThePony 2023-03-16 22:03:08 +07:00
parent 8bcc169c62
commit d0963c7fe9
Signed by: DBot
GPG Key ID: DCC23B5715498507

View File

@ -102,7 +102,12 @@ class ExoPackInventoryMenu(val capability: MatteryPlayerCapability) : MatteryMen
}
}
private var isRemoved = false
override fun slotsChanged(container: Container) {
if (isRemoved)
return // кому это интересно
super.slotsChanged(container)
if (container == craftingGrid) {
@ -121,6 +126,7 @@ class ExoPackInventoryMenu(val capability: MatteryPlayerCapability) : MatteryMen
throw RuntimeException("what.")
}
isRemoved = true
super.removed(player)
craftingResultContainer.clearContent()