From 1afdcbe05842ffe0a036c86ed8bd2ccab09f4d5e Mon Sep 17 00:00:00 2001 From: DBotThePony Date: Thu, 16 Jun 2022 15:29:24 +0700 Subject: [PATCH] Use faster int set --- .../mc/otm/block/entity/storage/StorageBusBlockEntity.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/storage/StorageBusBlockEntity.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/storage/StorageBusBlockEntity.kt index 0f4c331fe..d8e4b5851 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/storage/StorageBusBlockEntity.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/storage/StorageBusBlockEntity.kt @@ -1,6 +1,7 @@ package ru.dbotthepony.mc.otm.block.entity.storage import it.unimi.dsi.fastutil.ints.Int2ObjectAVLTreeMap +import it.unimi.dsi.fastutil.ints.IntAVLTreeSet import it.unimi.dsi.fastutil.ints.IntArraySet import it.unimi.dsi.fastutil.longs.Long2ObjectAVLTreeMap import net.minecraft.core.BlockPos @@ -237,7 +238,7 @@ class StorageBusBlockEntity(blockPos: BlockPos, blockState: BlockState) : Matter } private inner class PrioritizedSlotIterator(tuple: TrackedTuple?) : Iterator { - private val tupleIndexes = IntArraySet() + private val tupleIndexes = IntAVLTreeSet() init { if (tuple != null) {