Package net.minecraft.nbt
Class ListTag
- All Implemented Interfaces:
Iterable<Tag>,Collection<Tag>,List<Tag>,SequencedCollection<Tag>,Tag
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final intprivate byteFields inherited from class java.util.AbstractList
modCountFields inherited from interface net.minecraft.nbt.Tag
ARRAY_HEADER, MAX_DEPTH, OBJECT_HEADER, OBJECT_REFERENCE, STRING_SIZE, TAG_ANY_NUMERIC, TAG_BYTE, TAG_BYTE_ARRAY, TAG_COMPOUND, TAG_DOUBLE, TAG_END, TAG_FLOAT, TAG_INT, TAG_INT_ARRAY, TAG_LIST, TAG_LONG, TAG_LONG_ARRAY, TAG_SHORT, TAG_STRING -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaccept(StreamTagVisitor p_197487_) voidaccept(TagVisitor p_177990_) voidbooleanvoidclear()copy()booleanget(int pIndex) getCompound(int pIndex) doublegetDouble(int pIndex) bytefloatgetFloat(int pIndex) bytegetId()intgetInt(int pIndex) int[]getIntArray(int pIndex) getList(int pIndex) long[]getLongArray(int pIndex) shortgetShort(int pIndex) getString(int pIndex) getType()inthashCode()booleanisEmpty()remove(int p_128751_) booleanintsize()inttoString()private booleanupdateType(Tag pTag) private voidvoidwrite(DataOutput pOutput) Methods inherited from class java.util.AbstractList
add, addAll, indexOf, iterator, lastIndexOf, listIterator, listIterator, removeRange, subListMethods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, remove, removeAll, retainAll, toArray, toArrayMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface java.util.List
addAll, addFirst, addLast, contains, containsAll, getFirst, getLast, remove, removeAll, removeFirst, removeLast, replaceAll, retainAll, reversed, sort, spliterator, toArray, toArrayMethods inherited from interface net.minecraft.nbt.Tag
acceptAsRoot, getAsString
-
Field Details
-
SELF_SIZE_IN_BYTES
private static final int SELF_SIZE_IN_BYTES- See Also:
-
TYPE
-
list
-
type
private byte type
-
-
Constructor Details
-
ListTag
-
ListTag
public ListTag() -
ListTag
public ListTag(int initialCapacity) Neo: create a list tag with the given initial capacity.- Parameters:
initialCapacity- the initial capacity of the list tag
-
-
Method Details
-
write
- Throws:
IOException
-
sizeInBytes
public int sizeInBytes() -
getId
public byte getId() -
getType
-
toString
- Specified by:
toStringin interfaceTag- Overrides:
toStringin classAbstractCollection<Tag>
-
updateTypeAfterRemove
private void updateTypeAfterRemove() -
remove
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceCollection<Tag>- Specified by:
isEmptyin interfaceList<Tag>- Overrides:
isEmptyin classAbstractCollection<Tag>
-
getCompound
-
getList
-
getShort
public short getShort(int pIndex) -
getInt
public int getInt(int pIndex) -
getIntArray
public int[] getIntArray(int pIndex) -
getLongArray
public long[] getLongArray(int pIndex) -
getDouble
public double getDouble(int pIndex) -
getFloat
public float getFloat(int pIndex) -
getString
-
size
public int size()- Specified by:
sizein interfaceCollection<Tag>- Specified by:
sizein interfaceList<Tag>- Specified by:
sizein classAbstractCollection<Tag>
-
get
-
set
-
add
-
setTag
- Specified by:
setTagin classCollectionTag<Tag>
-
addTag
- Specified by:
addTagin classCollectionTag<Tag>
-
updateType
-
copy
-
equals
- Specified by:
equalsin interfaceCollection<Tag>- Specified by:
equalsin interfaceList<Tag>- Overrides:
equalsin classAbstractList<Tag>
-
hashCode
public int hashCode()- Specified by:
hashCodein interfaceCollection<Tag>- Specified by:
hashCodein interfaceList<Tag>- Overrides:
hashCodein classAbstractList<Tag>
-
accept
-
getElementType
public byte getElementType()- Specified by:
getElementTypein classCollectionTag<Tag>
-
clear
public void clear()- Specified by:
clearin interfaceCollection<Tag>- Specified by:
clearin interfaceList<Tag>- Overrides:
clearin classAbstractList<Tag>
-
accept
-