SlotGroup

class SlotGroup<T : ItemSlot>(val slots: List<T>) : List<T>

Constructors

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

Properties

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

Functions

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> SlotGroup<T>.findClosestSlot(predicate: (ItemStack) -> Boolean): T?
fun <T : HotbarItemSlot> SlotGroup<T>.findClosestSlot(item: Item): T?
Link copied to clipboard
inline fun findSlot(predicate: (ItemStack) -> Boolean): T?
fun findSlot(item: Item): T?
Link copied to clipboard
inline fun <T, R> List<T>.flatMapVirtual(transform: (T) -> List<R>): List<R>

Creates a virtual List represents the lists get from receiver with transform. It assumes all transformed list are immutable. Modify them leads to undefined behavior.

Link copied to clipboard
open operator override fun get(index: Int): T
Link copied to clipboard
fun SlotGroup<*>.hasItem(item: Item): Boolean
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): SlotGroup<ItemSlot>
operator fun plus(other: SlotGroup<*>): SlotGroup<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