kettle

Kotlin utilities for Quilt mod development


Project maintained by Cypher121 Hosted on GitHub Pages — Theme by mattgraham

//kettle/coffee.cypher.kettle.inventory

Package-level declarations

Properties

Name Summary
slotRange [jvm]
val Inventory.slotRange: IntRange
Returns a range of all slot indices of this Inventory.

Functions

Name Summary
asIterable [jvm]
fun Inventory.asIterable(): Iterable<ItemStack>
Returns this Inventory’s slots as an Iterable of ItemStacks contained within.
asSequence [jvm]
fun Inventory.asSequence(): Sequence<ItemStack>
Returns this Inventory’s slots as a Sequence of ItemStacks contained within.
contains [jvm]
operator fun Inventory.contains(item: Item): Boolean
Returns true if any slots of this Inventory contain an ItemStack of the given item, or false otherwise.
get [jvm]
operator fun Inventory.get(slot: Int): ItemStack
Returns the ItemStack contained in the given slot of this Inventory.
getSideAccess [jvm]
fun Inventory.getSideAccess(side: Direction): Inventory
Creates a proxy Inventory that only represents slots of this Inventory available from the specified side.
iterator [jvm]
operator fun Inventory.iterator(): Iterator<ItemStack>
Returns the Iterator for this Inventory’s slots.
set [jvm]
operator fun Inventory.set(slot: Int, stack: ItemStack)
Sets the ItemStack contained in the given slot of this Inventory to the provided stack.
toList [jvm]
fun Inventory.toList(): List<ItemStack>
Returns the ItemStack contents of this Inventory’s slots collected into a List.