NBTList

public class NBTList extends AbstractList<E>

An ordered sequence of NBT tags, all with the same TagType. Lists of 1 or more tags cannot have a content type of TAG_End. Otherwise, if the list is empty, it is allowed.

Author

Nullicorn

Constructors

Link copied to clipboard
public void NBTList(TagType type)
Creates a new list that can only hold tags with the provided type.

Functions

Link copied to clipboard
public boolean add(Object tag)
Appends a nameless NBT tag to the end of the list.
public void add(int index, Object tag)
Inserts a nameless NBT tag at the index in the list.
Link copied to clipboard
public boolean addAll(Collection<? extends Object> tags)
Appends any provided NBT tags to the end of the list.
public boolean addAll(int index, Collection<? extends Object> tags)
Inserts any provided NBT tags into the list at a given index.
Link copied to clipboard
public void clear()
Link copied to clipboard
public boolean contains(Object o)
Link copied to clipboard
public boolean containsAll(Collection<? extends Object> c)
Link copied to clipboard
public static List<E> copyOf<E>(Collection<? extends E> coll)
Link copied to clipboard
public boolean equals(Object o)
Link copied to clipboard
public void forEach(Consumer<? extends Object> action)
Link copied to clipboard
public void forEachByte(Consumer<Byte> action)
Iterates over every byte in the list using the provided action.
Link copied to clipboard
public void forEachByteArray(Consumer<Array<byte>> action)
Iterates over every byte array in the list using the provided action.
Link copied to clipboard
public void forEachCompound(Consumer<NBTCompound> action)
Iterates over every compound in the list using the provided action.
Link copied to clipboard
public void forEachDouble(Consumer<Double> action)
Iterates over every double in the list using the provided action.
Link copied to clipboard
public void forEachFloat(Consumer<Float> action)
Iterates over every float in the list using the provided action.
Link copied to clipboard
public void forEachInt(Consumer<Integer> action)
Iterates over every int in the list using the provided action.
Link copied to clipboard
public void forEachIntArray(Consumer<Array<int>> action)
Iterates over every int array in the list using the provided action.
Link copied to clipboard
public void forEachList(Consumer<NBTList> action)
Iterates over every nested list (inside the current list) using the provided action.
Link copied to clipboard
public void forEachLong(Consumer<Long> action)
Iterates over every long in the list using the provided action.
Link copied to clipboard
public void forEachLongArray(Consumer<Array<long>> action)
Iterates over every long array in the list using the provided action.
Link copied to clipboard
public void forEachShort(Consumer<Short> action)
Consumes every short in the list using the provided action.
Link copied to clipboard
public void forEachString(Consumer<String> action)
Iterates over every string in the list using the provided action.
Link copied to clipboard
public Object get(int index)
Link copied to clipboard
public Byte getByte(int index)
Link copied to clipboard
public Array<byte> getByteArray(int index)
Link copied to clipboard
public NBTCompound getCompound(int index)
Link copied to clipboard
public TagType getContentType()
The type of tags stored in the list.
Link copied to clipboard
public Double getDouble(int index)
Link copied to clipboard
public Float getFloat(int index)
Link copied to clipboard
public Integer getInt(int index)
Link copied to clipboard
public Array<int> getIntArray(int index)
Link copied to clipboard
public NBTList getList(int index)
Link copied to clipboard
public Long getLong(int index)
Link copied to clipboard
public Array<long> getLongArray(int index)
Link copied to clipboard
public Short getShort(int index)
Link copied to clipboard
public String getString(int index)
Link copied to clipboard
public int hashCode()
Link copied to clipboard
public int indexOf(Object o)
Link copied to clipboard
public boolean isEmpty()
Link copied to clipboard
public abstract Iterator<T> iterator()
public Iterator<Object> iterator()
Link copied to clipboard
public int lastIndexOf(Object o)
Link copied to clipboard
public ListIterator<E> listIterator()
Link copied to clipboard
public static List<E> of<E>()
Link copied to clipboard
public Stream<Object> parallelStream()
Link copied to clipboard
public Object remove(int index)
public boolean remove(Object o)
Link copied to clipboard
public boolean removeAll(Collection<? extends Object> c)
Link copied to clipboard
public boolean removeIf(Predicate<? extends Object> filter)
Link copied to clipboard
public void replaceAll(UnaryOperator<E> operator)
Link copied to clipboard
public boolean retainAll(Collection<? extends Object> c)
Link copied to clipboard
public Object set(int index, Object tag)
Link copied to clipboard
public int size()
Link copied to clipboard
public void sort(Comparator<? extends Object> c)
Link copied to clipboard
public Spliterator<T> spliterator()
public Spliterator<Object> spliterator()
Link copied to clipboard
public Stream<Object> stream()
Link copied to clipboard
public List<Object> subList(int fromIndex, int toIndex)
Link copied to clipboard
public Array<Object> toArray()
public Array<Object> toArray(Array<Object> a)
Link copied to clipboard
public String toString()

Properties

Link copied to clipboard
public final TagType contentType