Package net.minecraft.nbt
Class ListTag
public class ListTag extends AbstractListTag<Tag>
-
Field Summary
Fields Modifier and Type Field Description static TagReader<ListTag>READERprivate bytetypeprivate List<Tag>valueFields inherited from class java.util.AbstractList
modCount -
Constructor Summary
-
Method Summary
Modifier and Type Method Description voidaccept(NbtTagVisitor visitor)voidadd(int int2, Tag tag)booleanaddTag(int index, Tag tag)private booleancanAdd(Tag tag)voidclear()ListTagcopy()booleanequals(Object o)private voidforgetTypeIfEmpty()Tagget(int int2)CompoundTaggetCompound(int index)doublegetDouble(int index)bytegetElementType()floatgetFloat(int index)intgetInt(int index)int[]getIntArray(int index)ListTaggetList(int index)TagReader<ListTag>getReader()shortgetShort(int index)StringgetString(int index)bytegetType()inthashCode()booleanisEmpty()Tagremove(int int2)Tagset(int int2, Tag tag)booleansetTag(int index, Tag tag)intsize()StringtoString()voidwrite(DataOutput output)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, contains, containsAll, remove, removeAll, replaceAll, retainAll, sort, spliterator, toArray, toArray
-
Field Details
-
READER
-
value
-
type
private byte type
-
-
Constructor Details
-
ListTag
-
ListTag
public ListTag()
-
-
Method Details
-
write
- Throws:
IOException
-
getType
public byte getType() -
getReader
-
toString
- Specified by:
toStringin interfaceTag- Overrides:
toStringin classAbstractCollection<Tag>
-
forgetTypeIfEmpty
private void forgetTypeIfEmpty() -
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 index) -
getInt
public int getInt(int index) -
getIntArray
public int[] getIntArray(int index) -
getDouble
public double getDouble(int index) -
getFloat
public float getFloat(int index) -
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 classAbstractListTag<Tag>
-
addTag
- Specified by:
addTagin classAbstractListTag<Tag>
-
canAdd
-
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 classAbstractListTag<Tag>
-
clear
public void clear()- Specified by:
clearin interfaceCollection<Tag>- Specified by:
clearin interfaceList<Tag>- Overrides:
clearin classAbstractList<Tag>
-