Package net.minecraft.nbt
Class ListTag
public class ListTag extends AbstractListTag<Tag>
-
Field Summary
Fields Modifier and Type Field Description private static ByteSet
NBT_NUMBER_TYPES
static TagReader<ListTag>
READER
private byte
type
private List<Tag>
value
Fields inherited from class java.util.AbstractList
modCount
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description void
add(int int2, Tag tag)
boolean
addTag(int index, Tag tag)
private boolean
canAdd(Tag tag)
void
clear()
ListTag
copy()
boolean
equals(Object o)
private void
forgetTypeIfEmpty()
Tag
get(int int2)
CompoundTag
getCompound(int index)
double
getDouble(int index)
byte
getElementType()
float
getFloat(int index)
int
getInt(int int2)
int[]
getIntArray(int index)
ListTag
getList(int index)
TagReader<ListTag>
getReader()
short
getShort(int index)
String
getString(int index)
byte
getType()
int
hashCode()
boolean
isEmpty()
Tag
remove(int int2)
Tag
set(int int2, Tag tag)
boolean
setTag(int index, Tag tag)
int
size()
String
toString()
Text
toText(String indent, int depth)
void
write(DataOutput output)
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, contains, containsAll, remove, removeAll, replaceAll, retainAll, sort, spliterator, toArray, toArray
-
Field Details
-
READER
-
NBT_NUMBER_TYPES
-
value
-
type
private byte type
-
-
Constructor Details
-
ListTag
-
ListTag
public ListTag()
-
-
Method Details
-
write
- Throws:
IOException
-
getType
public byte getType() -
getReader
-
toString
- Specified by:
toString
in interfaceTag
- Overrides:
toString
in classAbstractCollection<Tag>
-
forgetTypeIfEmpty
private void forgetTypeIfEmpty() -
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 index) -
getInt
public int getInt(int int2) -
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:
size
in interfaceCollection<Tag>
- Specified by:
size
in interfaceList<Tag>
- Specified by:
size
in classAbstractCollection<Tag>
-
get
-
set
-
add
-
setTag
- Specified by:
setTag
in classAbstractListTag<Tag>
-
addTag
- Specified by:
addTag
in classAbstractListTag<Tag>
-
canAdd
-
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>
-
toText
-
getElementType
public byte getElementType()- Specified by:
getElementType
in classAbstractListTag<Tag>
-
clear
public void clear()- Specified by:
clear
in interfaceCollection<Tag>
- Specified by:
clear
in interfaceList<Tag>
- Overrides:
clear
in classAbstractList<Tag>
-