Package net.minecraft.nbt
Class ListTag
- All Implemented Interfaces:
Iterable<Tag>
,Collection<Tag>
,List<Tag>
,SequencedCollection<Tag>
,CollectionTag
,Tag
-
Field Summary
FieldsFields 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_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_) void
accept
(TagVisitor p_177990_) void
void
addAndUnwrap
(Tag p_410164_) boolean
asList()
void
clear()
copy()
boolean
get
(int p_128781_) getCompound
(int p_128729_) getCompoundOrEmpty
(int p_410248_) getDouble
(int p_128773_) double
getDoubleOr
(int p_410727_, double p_410555_) getFloat
(int p_128776_) float
getFloatOr
(int p_410012_, float p_409704_) byte
getId()
getInt
(int p_128764_) Optional
<int[]> getIntArray
(int p_128768_) int
getIntOr
(int p_409647_, int p_410162_) getList
(int p_128745_) getListOrEmpty
(int p_410667_) Optional
<long[]> getLongArray
(int p_177992_) private Tag
getNullable
(int p_410208_) getOptional
(int p_410804_) getShort
(int p_128758_) short
getShortOr
(int p_410773_, short p_410394_) getString
(int p_128779_) getStringOr
(int p_410678_, String p_409906_) getType()
int
hashCode()
(package private) byte
boolean
isEmpty()
private static boolean
isWrapper
(CompoundTag p_410439_) remove
(int p_128751_) boolean
int
size()
int
stream()
toString()
private static Tag
tryUnwrap
(CompoundTag p_410108_) private static CompoundTag
wrapElement
(Tag p_410663_) private static Tag
wrapIfNeeded
(byte p_410100_, Tag p_409984_) void
write
(DataOutput p_128734_) 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, toArray
Methods inherited from interface net.minecraft.nbt.CollectionTag
iterator
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, asBoolean, asByte, asByteArray, asCompound, asDouble, asFloat, asInt, asIntArray, asLong, asLongArray, asNumber, asShort, asString
-
Field Details
-
WRAPPER_MARKER
- See Also:
-
SELF_SIZE_IN_BYTES
private static final int SELF_SIZE_IN_BYTES- See Also:
-
TYPE
-
list
-
-
Constructor Details
-
ListTag
public ListTag() -
ListTag
-
-
Method Details
-
tryUnwrap
-
isWrapper
-
wrapIfNeeded
-
wrapElement
-
write
- Specified by:
write
in interfaceTag
- Throws:
IOException
-
identifyRawElementType
byte identifyRawElementType() -
addAndUnwrap
-
sizeInBytes
public int sizeInBytes()- Specified by:
sizeInBytes
in interfaceTag
-
getId
public byte getId() -
getType
-
toString
- Specified by:
toString
in interfaceTag
- Overrides:
toString
in classAbstractCollection<Tag>
-
remove
- Specified by:
remove
in interfaceCollectionTag
- Specified by:
remove
in interfaceList<Tag>
- Overrides:
remove
in classAbstractList<Tag>
-
isEmpty
public boolean isEmpty()- Specified by:
isEmpty
in interfaceCollection<Tag>
- Specified by:
isEmpty
in interfaceCollectionTag
- Specified by:
isEmpty
in interfaceList<Tag>
- Overrides:
isEmpty
in classAbstractCollection<Tag>
-
getCompound
-
getCompoundOrEmpty
-
getList
-
getListOrEmpty
-
getShort
-
getShortOr
public short getShortOr(int p_410773_, short p_410394_) -
getInt
-
getIntOr
public int getIntOr(int p_409647_, int p_410162_) -
getIntArray
-
getLongArray
-
getDouble
-
getDoubleOr
public double getDoubleOr(int p_410727_, double p_410555_) -
getFloat
-
getFloatOr
public float getFloatOr(int p_410012_, float p_409704_) -
getString
-
getStringOr
-
getNullable
-
getOptional
-
size
public int size()- Specified by:
size
in interfaceCollection<Tag>
- Specified by:
size
in interfaceCollectionTag
- Specified by:
size
in interfaceList<Tag>
- Specified by:
size
in classAbstractCollection<Tag>
-
get
- Specified by:
get
in interfaceCollectionTag
- Specified by:
get
in interfaceList<Tag>
- Specified by:
get
in classAbstractList<Tag>
-
set
-
add
-
setTag
- Specified by:
setTag
in interfaceCollectionTag
-
addTag
- Specified by:
addTag
in interfaceCollectionTag
-
copy
-
asList
-
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>
-
stream
- Specified by:
stream
in interfaceCollection<Tag>
- Specified by:
stream
in interfaceCollectionTag
-
compoundStream
-
accept
-
clear
public void clear()- Specified by:
clear
in interfaceCollection<Tag>
- Specified by:
clear
in interfaceCollectionTag
- Specified by:
clear
in interfaceList<Tag>
- Overrides:
clear
in classAbstractList<Tag>
-
accept
-