Ignore slotsChanged when removing exopack menu
This commit is contained in:
parent
8bcc169c62
commit
d0963c7fe9
@ -102,7 +102,12 @@ class ExoPackInventoryMenu(val capability: MatteryPlayerCapability) : MatteryMen
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private var isRemoved = false
|
||||||
|
|
||||||
override fun slotsChanged(container: Container) {
|
override fun slotsChanged(container: Container) {
|
||||||
|
if (isRemoved)
|
||||||
|
return // кому это интересно
|
||||||
|
|
||||||
super.slotsChanged(container)
|
super.slotsChanged(container)
|
||||||
|
|
||||||
if (container == craftingGrid) {
|
if (container == craftingGrid) {
|
||||||
@ -121,6 +126,7 @@ class ExoPackInventoryMenu(val capability: MatteryPlayerCapability) : MatteryMen
|
|||||||
throw RuntimeException("what.")
|
throw RuntimeException("what.")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
isRemoved = true
|
||||||
super.removed(player)
|
super.removed(player)
|
||||||
|
|
||||||
craftingResultContainer.clearContent()
|
craftingResultContainer.clearContent()
|
||||||
|
Loading…
Reference in New Issue
Block a user