NBTList

class NBTList<Tag : NBT@JvmOverloads() constructor(subtagType: NBTType<out Tag>, _tags: List<Tag>) : NBT, Iterable<Tag>

Types

Companion
Link copied to clipboard
object Companion : NBTReaderCompanion<NBTList<NBT>>

Functions

asListOf
Link copied to clipboard
fun <T : NBT> asListOf(): NBTList<T>
Casts this list to another list type.
asListView
Link copied to clipboard
fun asListView(): List<Tag>
Returns a List representing this compound.
contains
Link copied to clipboard
operator fun contains(element: Tag): Boolean
Checks if the specified element is contained in this list.
containsAll
Link copied to clipboard
fun containsAll(elements: Collection<Tag>): Boolean
Checks if all elements in the specified collection are contained in this list.
equals
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
forEach
Link copied to clipboard
open fun forEach(p0: Consumer<in Tag>)
fun forEach(action: (Tag) -> Unit)
Performs the given action on each element.
get
Link copied to clipboard
operator fun get(index: Int): Tag
Returns the tag at the given index
hashCode
Link copied to clipboard
open override fun hashCode(): Int
indexOf
Link copied to clipboard
fun indexOf(element: Tag): Int
Returns the index of the first occurrence of the specified element in the list, or -1 if the specified element is not contained in the list.
isEmpty
Link copied to clipboard
fun isEmpty(): Boolean
Returns true if the collection is empty (contains no elements), false otherwise.
isNotEmpty
Link copied to clipboard
fun isNotEmpty(): Boolean
Returns false if the collection is empty (contains no elements), true otherwise.
iterator
Link copied to clipboard
open operator override fun iterator(): Iterator<Tag>
Returns an iterator over the elements of this object.
listIterator
Link copied to clipboard
fun listIterator(index: Int = 0): ListIterator<Tag>
Returns a list iterator over the elements in this list (in proper sequence), starting at the specified index.
spliterator
Link copied to clipboard
open fun spliterator(): Spliterator<Tag>
subList
Link copied to clipboard
fun subList(fromIndex: Int, toIndex: Int): NBTList<Tag>
Returns a view of the portion of this list between the specified fromIndex (inclusive) and toIndex (exclusive).
toByteArray
Link copied to clipboard
open fun toByteArray(): ByteArray
toSNBT
Link copied to clipboard
open override fun toSNBT(): String
Produces the stringified version of this NBT (or SNBT version).
toString
Link copied to clipboard
open override fun toString(): String
Produces a human-readable version of this tag.
writeContents
Link copied to clipboard
open override fun writeContents(destination: DataOutputStream)
Writes the contents of the list, WITH for the subtag ID

Properties

ID
Link copied to clipboard
open override val ID: NBTType<NBTList<*>>
ID of this tag type
size
Link copied to clipboard
val size: Int
Returns the size of the list.
subtagType
Link copied to clipboard
val subtagType: NBTType<out Tag>
value
Link copied to clipboard
open override val value: List<Tag>