NbtListBuilder

Builder class for an NBT list.

ListTag determines its type from the first element added, all following elements are required to have the same type, otherwise an UnsupportedOperationException is thrown.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
fun add(value: Boolean)
fun add(value: Byte)
fun add(value: Char)
fun add(value: Double)
fun add(value: Float)
fun add(value: Int)
fun add(value: Long)
fun add(value: Short)
fun add(value: String)
fun add(value: Tag)
Link copied to clipboard
fun build(): ListTag
Link copied to clipboard
fun byteArray(vararg value: Byte)
Link copied to clipboard
inline fun compound(build: NbtCompoundBuilder.() -> Unit)
Link copied to clipboard
fun intArray(vararg value: Int)
fun intArray(value: Collection<Int>)
Link copied to clipboard
inline fun list(build: NbtListBuilder.() -> Unit)

inline fun <T> list(value: Iterable<T>)

Adds an NBT list (not a primitive array) with all elements in value.

Link copied to clipboard
fun longArray(vararg value: Long)