public class NBTCompoundList extends NBTList<ReadWriteNBT> implements ReadWriteNBTCompoundList
NBTListCompound
implementation for NBTListslistObject
Modifier | Constructor and Description |
---|---|
protected |
NBTCompoundList(NBTCompound owner,
String name,
NBTType type,
Object list) |
Modifier and Type | Method and Description |
---|---|
void |
add(int index,
ReadWriteNBT element)
Adds the specified element at the specified position in this list.
|
boolean |
add(ReadWriteNBT empty)
Deprecated.
Please use addCompound!
|
NBTListCompound |
addCompound()
Adds a new Compound to the end of the List and returns it.
|
NBTCompound |
addCompound(NBTCompound comp)
Adds a copy of the Compound to the end of the List and returns it.
|
ReadWriteNBT |
addCompound(ReadableNBT comp)
Adds a copy of the Compound to the end of the List and returns it.
|
protected Object |
asTag(ReadWriteNBT object) |
NBTListCompound |
get(int index)
Get the object with the given id.
|
NBTListCompound |
set(int index,
ReadWriteNBT element)
Replaces the element at the specified position in this list with the
specified element.
|
addAll, addAll, clear, contains, containsAll, getName, getParent, getType, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, retainAll, save, size, subList, toArray, toArray, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
clear, remove, removeIf
contains, containsAll, getType, indexOf, isEmpty, lastIndexOf, size, subList, toArray, toArray, toListCopy
forEach, iterator, spliterator
equals, hashCode, replaceAll, sort, spliterator
parallelStream, stream
protected NBTCompoundList(NBTCompound owner, String name, NBTType type, Object list)
public NBTListCompound addCompound()
addCompound
in interface ReadWriteNBTCompoundList
NBTListCompound
public NBTCompound addCompound(NBTCompound comp)
comp
- public ReadWriteNBT addCompound(ReadableNBT comp)
ReadWriteNBTCompoundList
addCompound
in interface ReadWriteNBTCompoundList
@Deprecated public boolean add(ReadWriteNBT empty)
add
in interface ReadWriteNBTList<ReadWriteNBT>
add
in interface Collection<ReadWriteNBT>
add
in interface List<ReadWriteNBT>
add
in class NBTList<ReadWriteNBT>
empty
- public void add(int index, ReadWriteNBT element)
ReadWriteNBTList
add
in interface ReadWriteNBTList<ReadWriteNBT>
add
in interface List<ReadWriteNBT>
add
in class NBTList<ReadWriteNBT>
index
- The index at which the specified element is to be insertedelement
- The element to be added to the list.public NBTListCompound get(int index)
ReadableNBTList
get
in interface ReadableNBTList<ReadWriteNBT>
get
in interface List<ReadWriteNBT>
index
- The id of the object to get.public NBTListCompound set(int index, ReadWriteNBT element)
ReadWriteNBTList
set
in interface ReadWriteNBTList<ReadWriteNBT>
set
in interface List<ReadWriteNBT>
set
in class NBTList<ReadWriteNBT>
index
- The index of the element to replaceelement
- The element to be stored at the specified positionprotected Object asTag(ReadWriteNBT object)
asTag
in class NBTList<ReadWriteNBT>
Copyright © 2015–2024 tr7zw. All rights reserved.