Fix crash caused by panel removing itself during tick
This commit is contained in:
parent
a1fd948266
commit
7869d686f7
@ -582,9 +582,9 @@ abstract class MatteryScreen<T : MatteryMenu>(menu: T, inventory: Inventory, tit
|
||||
}
|
||||
|
||||
override fun containerTick() {
|
||||
for (panel in panels) {
|
||||
panel.tick()
|
||||
}
|
||||
val copy = ArrayList<EditablePanel<*>>(panels.size)
|
||||
for (panel in panels) copy.add(panel)
|
||||
for (panel in copy) panel.tick()
|
||||
}
|
||||
|
||||
companion object {
|
||||
|
Loading…
Reference in New Issue
Block a user