Update InventoryGUISlots.kt

This commit is contained in:
bluefireoly
2020-10-02 15:40:14 +02:00
parent 45d1f6ea95
commit b88f50eb2d

View File

@@ -72,7 +72,12 @@ data class InventorySlot(val row: Int, val slotInRow: Int) : Comparable<Inventor
}
interface InventorySlotCompound<out T : ForInventory> {
fun withInvType(invType: InventoryType<T>): Collection<InventorySlot>
fun realSlotsWithInvType(invType: InventoryType<T>)
= withInvType(invType).mapNotNull { it.realSlotIn(invType.dimensions) }
}
open class SingleInventorySlot<T : ForInventory> internal constructor(