NBTTag.NBTTagType| Constructor and Description |
|---|
ListTag(NBTTag... tags)
Creates a ListTag containing the given
NBTTags. |
| Modifier and Type | Method and Description |
|---|---|
protected void |
_print(PrintStream stream,
String indent) |
void |
_read(io.netty.buffer.ByteBuf buf,
ByteOrder order) |
void |
_write(io.netty.buffer.ByteBuf buf,
ByteOrder order) |
void |
add(NBTTag tag)
Adds a tag to this compound tag.
|
void |
clear()
Removes all tags contained in this compound tag.
|
NBTTag |
get(int index)
Gets the n-th
NBTTag to be added to this tag. |
byte[] |
getAsByteArray(int n)
Attempts to get the given tag as a byte array.
|
ByteArrayTag |
getAsByteArrayTag(int n)
Attempts to get the given tag as a ByteArrayTag.
|
CompoundTag |
getAsCompoundTag(int n)
Attempts to get the given tag as a compound tag.
|
int[] |
getAsIntArray(int n)
Attempts to get the given tag as an int array.
|
IntArrayTag |
getAsIntArrayTag(int n)
Attempts to get the given tag as a IntArrayTag.
|
ListTag |
getAsListTag(int n)
Attempts to get the given tag as a list tag.
|
Number |
getAsNumber(int n)
Attempts to get the given tag as a Number.
|
NumberTag |
getAsNumberTag(int n)
Attempts to get the given tag as a NumberTag.
|
String |
getAsString(int n)
Attempts to get the given tag as a string.
|
StringTag |
getAsStringTag(int n)
Attempts to get the given tag as a StringTag.
|
boolean |
isByteArray(int n)
Checks whether or not the given tag represents a byte array.
|
boolean |
isCompoundTag(int n)
Checks whether or not the given tag represents a compound tag.
|
boolean |
isIntArray(int n)
Checks whether or not the given tag represents an int array.
|
boolean |
isListTag(int n)
Checks whether or not the given tag represents a list tag.
|
boolean |
isNumber(int n)
Checks whether or not the given tag represents a number.
|
boolean |
isString(int n)
Checks whether or not the given tag represents a String.
|
Iterator<NBTTag> |
iterator() |
List<NBTTag> |
list()
Gets a list representation of the
NBTTags in this list tag. |
void |
remove(int index)
Removes the n-th tag from the compound tag.
|
void |
set(List<NBTTag> tags)
Sets the backing list of tags to be the given one.
|
int |
size()
Gets the number of tags added to this list tag.
|
Spliterator<NBTTag> |
spliterator() |
getAsByteArray, getAsByteArrayTag, getAsCompoundTag, getAsIntArray, getAsIntArrayTag, getAsListTag, getAsNumber, getAsNumberTag, getAsString, getAsStringTag, getName, getTypeId, indent, isByteArray, isCompoundTag, isIntArray, isListTag, isNumber, isString, name, print, read, readString, setHasName, setName, setWriteType, toString, write, writeStringpublic Spliterator<NBTTag> spliterator()
spliterator in interface Iterable<NBTTag>public List<NBTTag> list()
NBTTags in this list tag.public NBTTag get(int index)
NBTTag to be added to this tag.
If negative, gets the Math.abs(n)-th last.index - The index, n.public boolean isNumber(int n)
n - The index of the tag.public Number getAsNumber(int n)
n - The index of the tag.public NumberTag getAsNumberTag(int n)
n - The index of the tag.public boolean isString(int n)
n - The index of the tag.public String getAsString(int n)
n - The index of the tag.public StringTag getAsStringTag(int n)
n - The index of the tag.public boolean isByteArray(int n)
n - The index of the tag.public byte[] getAsByteArray(int n)
n - The index of the tag.public ByteArrayTag getAsByteArrayTag(int n)
n - The index of the tag.public boolean isIntArray(int n)
n - The index of the tag.public int[] getAsIntArray(int n)
n - The index of the tag.public IntArrayTag getAsIntArrayTag(int n)
n - The index of the tag.public boolean isListTag(int n)
n - The index of the tag.public ListTag getAsListTag(int n)
n - The index of the tag.public boolean isCompoundTag(int n)
n - The index of the tag.public CompoundTag getAsCompoundTag(int n)
n - The index of the tag.public int size()
public void add(NBTTag tag)
tag - The tag.public void remove(int index)
index - The index, n.public void clear()
public void set(List<NBTTag> tags)
tags - The tags.public void _read(io.netty.buffer.ByteBuf buf,
ByteOrder order)
public void _write(io.netty.buffer.ByteBuf buf,
ByteOrder order)
protected void _print(PrintStream stream, String indent)
Copyright © 2017. All rights reserved.