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 int
private byte
Fields inherited from class java.util.AbstractList
modCount
Fields 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 pVisitor) void
accept
(TagVisitor pVisitor) void
boolean
void
clear()
copy()
boolean
get
(int pIndex) getCompound
(int pIndex) double
getDouble
(int pIndex) byte
float
getFloat
(int pIndex) byte
getId()
int
getInt
(int pIndex) int[]
getIntArray
(int pIndex) getList
(int pIndex) long[]
getLongArray
(int pIndex) short
getShort
(int pIndex) getString
(int pIndex) getType()
int
hashCode()
boolean
isEmpty()
remove
(int p_128751_) boolean
int
size()
int
toString()
private boolean
updateType
(Tag pTag) private void
void
write
(DataOutput pOutput) Methods inherited from class java.util.AbstractList
add, addAll, indexOf, iterator, lastIndexOf, listIterator, listIterator, removeRange, subList
Methods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, remove, removeAll, retainAll, toArray, toArray
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
Methods inherited from interface java.util.List
addAll, addFirst, addLast, contains, containsAll, getFirst, getLast, remove, removeAll, removeFirst, removeLast, replaceAll, retainAll, reversed, sort, spliterator, toArray, toArray
Methods 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:
toString
in interfaceTag
- Overrides:
toString
in classAbstractCollection<Tag>
-
updateTypeAfterRemove
private void updateTypeAfterRemove() -
remove
-
isEmpty
public boolean isEmpty()- Specified by:
isEmpty
in interfaceCollection<Tag>
- Specified by:
isEmpty
in interfaceList<Tag>
- Overrides:
isEmpty
in 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:
size
in interfaceCollection<Tag>
- Specified by:
size
in interfaceList<Tag>
- Specified by:
size
in classAbstractCollection<Tag>
-
get
-
set
-
add
-
setTag
- Specified by:
setTag
in classCollectionTag<Tag>
-
addTag
- Specified by:
addTag
in classCollectionTag<Tag>
-
updateType
-
copy
-
equals
- Specified by:
equals
in interfaceCollection<Tag>
- Specified by:
equals
in interfaceList<Tag>
- Overrides:
equals
in classAbstractList<Tag>
-
hashCode
public int hashCode()- Specified by:
hashCode
in interfaceCollection<Tag>
- Specified by:
hashCode
in interfaceList<Tag>
- Overrides:
hashCode
in classAbstractList<Tag>
-
accept
-
getElementType
public byte getElementType()- Specified by:
getElementType
in classCollectionTag<Tag>
-
clear
public void clear()- Specified by:
clear
in interfaceCollection<Tag>
- Specified by:
clear
in interfaceList<Tag>
- Overrides:
clear
in classAbstractList<Tag>
-
accept
-