JoinedList

class JoinedList<T>(val source: List<T>, val separator: T) : AbstractObjectList<T> , RandomAccess

Read-only list view that interleaves separator between the elements of source, i.e. iterating yields source[0], separator, source[1], separator, source[2], ....

Changes to the original list are reflected in this view.

Constructors

Link copied to clipboard
constructor(source: List<T>, separator: T)

Properties

Link copied to clipboard
open override val isEmpty: Boolean
Link copied to clipboard
Link copied to clipboard
open override val size: Int
Link copied to clipboard
val source: List<T>

Functions

Link copied to clipboard
open fun add(k: T?): Boolean
open fun add(index: Int, k: T?)
Link copied to clipboard
open fun addAll(l: ObjectList<out T?>?): Boolean
open fun addAll(index: Int, l: ObjectList<out T?>?): Boolean
open fun addAll(c: Collection<out T?>): Boolean
open fun addAll(index: Int, c: Collection<out T?>): Boolean
Link copied to clipboard
fun <T : Any> MutableCollection<T>.addAll(other: ColorCollection<T>)
fun <T : Any> MutableCollection<T>.addAll(other: WeatheringCopperCollection<T>)
Link copied to clipboard
open fun addElements(index: Int, a: Array<out T?>?)
open fun addElements(index: Int, a: Array<out T?>?, offset: Int, length: Int)
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 fun clear()
Link copied to clipboard
open operator fun compareTo(l: List<out T?>?): Int
Link copied to clipboard
open operator fun contains(k: T?): Boolean
Link copied to clipboard
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
open operator override fun get(index: Int): T
Link copied to clipboard
open fun getElements(from: Int, a: Array<out Any?>?, offset: Int, length: Int)
Link copied to clipboard
open fun indexOf(k: T?): Int
Link copied to clipboard
open fun isEmpty(): Boolean
Link copied to clipboard
open operator fun iterator(): ObjectListIterator<T?>
Link copied to clipboard
@JvmName(name = "stringsJoinToText")
fun Collection<String>.joinToText(separator: Component): Component

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

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<in T, out Component>): Component
Link copied to clipboard
open fun lastIndexOf(k: T?): Int
Link copied to clipboard
open fun listIterator(): ObjectListIterator<T?>
open fun listIterator(index: Int): ObjectListIterator<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
inline fun <T> Iterable<T>.mapToJsonArray(transform: (T) -> JsonElement?): JsonArray
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun Iterable<ItemSlot>.mergeableCapacityFor(itemStack: ItemStack, blacklist: Collection<ItemSlot>? = null): Int
Link copied to clipboard
open fun peek(i: Int): T?
Link copied to clipboard
open fun pop(): T?
Link copied to clipboard
open fun push(o: T?)
Link copied to clipboard
open fun remove(o: T?): Boolean
Link copied to clipboard
open fun removeAll(c: Collection<T?>): Boolean
Link copied to clipboard
open fun removeAt(i: Int): T?
Link copied to clipboard
open fun removeElements(from: Int, to: Int)
Link copied to clipboard
open fun retainAll(c: Collection<T?>): Boolean
Link copied to clipboard
open operator fun set(index: Int, k: T?): T?
Link copied to clipboard
open fun setElements(a: Array<out T?>?)
open fun setElements(index: Int, a: Array<out T?>?)
open fun setElements(index: Int, a: Array<out T?>?, offset: Int, length: Int)
Link copied to clipboard
open fun size(size: Int)
Link copied to clipboard
inline fun <T, K : Comparable<K>> MutableList<T>.sortedInsert(item: T, crossinline selector: (T) -> K?)

Inserts a new element into a sorted list while maintaining the order.

Link copied to clipboard
open fun subList(from: Int, to: Int): ObjectList<T?>
Link copied to clipboard
fun <T> List<T>.subList(fromIndex: Int): List<T>
Link copied to clipboard
open fun toArray(): Array<out Any?>?
open fun <T : Any?> toArray(a: Array<out T?>?): Array<out T?>?
Link copied to clipboard
Link copied to clipboard
open fun top(): T?
Link copied to clipboard
open fun unstableSort(comparator: Comparator<in T?>?)