NBTTag.NBTTagType| Constructor and Description |
|---|
CompoundTag(NBTTag... tags)
Creates a CompoundTag 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.
|
Optional<NBTTag> |
get(String name)
Gets the tag contained in this compound tag with a given name.
|
byte[] |
getAsByteArray(String name)
Attempts to get the given tag as a byte array.
|
ByteArrayTag |
getAsByteArrayTag(String name)
Attempts to get the given tag as a ByteArrayTag.
|
CompoundTag |
getAsCompoundTag(String name)
Attempts to get the given tag as a compound tag.
|
int[] |
getAsIntArray(String name)
Attempts to get the given tag as an int array.
|
IntArrayTag |
getAsIntArrayTag(String name)
Attempts to get the given tag as a IntArrayTag.
|
ListTag |
getAsListTag(String name)
Attempts to get the given tag as a list tag.
|
Number |
getAsNumber(String name)
Attempts to get the given tag as a Number.
|
NumberTag |
getAsNumberTag(String name)
Attempts to get the given tag as a NumberTag.
|
String |
getAsString(String name)
Attempts to get the given tag as a string.
|
StringTag |
getAsStringTag(String name)
Attempts to get the given tag as a StringTag.
|
boolean |
has(String name)
Gets whether or not there exists a tag in this compound tag with a given name.
|
boolean |
isByteArray(String name)
Checks whether or not the given tag represents a byte array.
|
boolean |
isCompoundTag(String name)
Checks whether or not the given tag represents a compound tag.
|
boolean |
isIntArray(String name)
Checks whether or not the given tag represents an int array.
|
boolean |
isListTag(String name)
Checks whether or not the given tag represents a list tag.
|
boolean |
isNumber(String name)
Checks whether or not the given tag represents a number.
|
boolean |
isString(String name)
Checks whether or not the given tag represents a String.
|
Iterator<NBTTag> |
iterator() |
Map<String,NBTTag> |
map()
Gets this compound tag as a map of Strings to
NBTTags. |
void |
remove(String name)
Removes the tag with the given name from the compound tag.
|
void |
set(Map<String,NBTTag> tags)
Sets the backing list of tags to be the given one.
|
int |
size()
Gets the number of tags added to this compound tag.
|
Spliterator<NBTTag> |
spliterator() |
Collection<NBTTag> |
values()
Gets this compound tag as a collection of
NBTTags. |
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 Collection<NBTTag> values()
NBTTags.public Map<String,NBTTag> map()
NBTTags.public Optional<NBTTag> get(String name)
name - The name.public boolean has(String name)
name - The name.public boolean isNumber(String name)
name - The name of the tag.public Number getAsNumber(String name)
name - The name of the tag.public NumberTag getAsNumberTag(String name)
name - The name of the tag.public boolean isString(String name)
name - The name of the tag.public String getAsString(String name)
name - The name of the tag.public StringTag getAsStringTag(String name)
name - The name of the tag.public boolean isByteArray(String name)
name - The name of the tag.public byte[] getAsByteArray(String name)
name - The name of the tag.public ByteArrayTag getAsByteArrayTag(String name)
name - The name of the tag.public boolean isIntArray(String name)
name - The name of the tag.public int[] getAsIntArray(String name)
name - The name of the tag.public IntArrayTag getAsIntArrayTag(String name)
name - The name of the tag.public boolean isListTag(String name)
name - The name of the tag.public ListTag getAsListTag(String name)
name - The name of the tag.public boolean isCompoundTag(String name)
name - The name of the tag.public CompoundTag getAsCompoundTag(String name)
name - The name of the tag.public int size()
public void add(NBTTag tag)
tag - The tag.public void remove(String name)
name - The name of the tag.public void clear()
public void set(Map<String,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.