use array

This commit is contained in:
DBotThePony 2023-03-26 15:42:44 +07:00
parent faf43657fc
commit d373393a5c
Signed by: DBot
GPG Key ID: DCC23B5715498507

View File

@ -582,9 +582,9 @@ abstract class MatteryScreen<T : MatteryMenu>(menu: T, inventory: Inventory, tit
} }
override fun containerTick() { override fun containerTick() {
val copy = ArrayList<EditablePanel<*>>(panels.size) val copy = arrayOfNulls<EditablePanel<*>>(panels.size)
for (panel in panels) copy.add(panel) for ((i, panel) in panels.withIndex()) copy[i] = panel
for (panel in copy) panel.tick() for (panel in copy) panel!!.tick()
} }
companion object { companion object {