Slots

class Slots<T : ItemSlot>(slots: List<T>) : List<T>

Constructors

Link copied to clipboard
constructor(slots: List<T>)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val items: Array<Item>
Link copied to clipboard
open override val size: Int
Link copied to clipboard
val stacks: Array<ItemStack>

Functions

Link copied to clipboard
fun Iterable<VoxelShape>.allEmpty(): Boolean
Link copied to clipboard
fun Iterable<VoxelShape>.anyNotEmpty(): Boolean
Link copied to clipboard
inline fun List<Component>.asText(): Component
Link copied to clipboard
fun Iterable<Vec3>.average(): Vec3
Link copied to clipboard
open operator override fun contains(element: T): Boolean
Link copied to clipboard
open override fun containsAll(elements: Collection<T>): Boolean
Link copied to clipboard

Creates a ZIP file from multiple files

Link copied to clipboard
fun <T : ItemSlot> Iterable<T>.findBestToolToMineBlock(blockState: BlockState, ignoreDurability: Boolean = true, predicate: BiPredicate<ItemStack, BlockState> = BiPredicate { _, _ -> true }): T?

Finds the best slot in this iterable for mining blockState using mc.player as baseline.

Link copied to clipboard
inline fun <T : HotbarItemSlot> Iterable<T>.findClosestSlot(predicate: (ItemStack) -> Boolean): T?
fun <T : HotbarItemSlot> Iterable<T>.findClosestSlot(itemTag: TagKey<Item>): T?
fun <T : HotbarItemSlot> Iterable<T>.findClosestSlot(item: Item): T?
fun <T : HotbarItemSlot> Iterable<T>.findClosestSlot(vararg items: Item): T?
Link copied to clipboard
fun findSlot(predicate: Predicate<ItemStack>): T?
inline fun findSlot(predicate: (ItemStack) -> Boolean): T?
fun findSlot(item: Item): T?
Link copied to clipboard
open operator override fun get(index: Int): T
Link copied to clipboard
open override fun indexOf(element: T): Int
Link copied to clipboard
open override fun isEmpty(): Boolean
Link copied to clipboard
open operator override fun iterator(): Iterator<T>
Link copied to clipboard
fun Collection<Component>.joinToText(separator: Component): Component

Joins a list of Component into a single Component with the given separator.

fun <T> Collection<T>.joinToText(separator: Component, prefix: Component? = null, postfix: Component? = null, transform: Function<T, Component>): Component
Link copied to clipboard
open override fun lastIndexOf(element: T): Int
Link copied to clipboard
open override fun listIterator(): ListIterator<T>
open override fun listIterator(index: Int): ListIterator<T>
Link copied to clipboard
Link copied to clipboard
inline fun <T> Collection<T>.mapString(transform: (T) -> Char): String

Transform a Collection to a String with by given transform

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
operator fun plus(other: ItemSlot): Slots<ItemSlot>
operator fun plus(other: Slots<*>): Slots<ItemSlot>
Link copied to clipboard
open override fun subList(fromIndex: Int, toIndex: Int): List<T>
Link copied to clipboard
fun <T> List<T>.subList(fromIndex: Int): List<T>
Link copied to clipboard