From d373393a5cc19b9572317eb44fcfe079b0d22b4e Mon Sep 17 00:00:00 2001 From: DBotThePony Date: Sun, 26 Mar 2023 15:42:44 +0700 Subject: [PATCH] use array --- .../ru/dbotthepony/mc/otm/client/screen/MatteryScreen.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/MatteryScreen.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/MatteryScreen.kt index 1f3960e11..577fdcb88 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/MatteryScreen.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/MatteryScreen.kt @@ -582,9 +582,9 @@ abstract class MatteryScreen(menu: T, inventory: Inventory, tit } override fun containerTick() { - val copy = ArrayList>(panels.size) - for (panel in panels) copy.add(panel) - for (panel in copy) panel.tick() + val copy = arrayOfNulls>(panels.size) + for ((i, panel) in panels.withIndex()) copy[i] = panel + for (panel in copy) panel!!.tick() } companion object {