Update InventoryGUISlots.kt

This commit is contained in:
bluefireoly
2020-10-21 17:16:58 +02:00
parent 76ea1bfab8
commit 014ee6e279

View File

@@ -38,7 +38,7 @@ data class InventorySlot(val row: Int, val slotInRow: Int) : Comparable<Inventor
companion object {
fun fromRealSlot(realSlot: Int, dimensions: InventoryDimensions) =
dimensions.realSlots.toList().find { it == realSlot }
dimensions.invSlotsWithRealSlots.toList().find { it.second == realSlot }?.first
}
override fun compareTo(other: InventorySlot) = when {