public class CompoundTagBuilder
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
CompoundTag
|
build()
Build an unnamed compound tag with this builder's entries.
|
CompoundTag
|
build(java.lang.String name)
Build a new compound tag with this builder's entries.
|
static CompoundTagBuilder |
create()
Create a new builder instance.
|
CompoundTagBuilder |
put(java.lang.String key,
Tag value)
Put the given key and tag into the compound tag.
|
CompoundTagBuilder |
putAll(java.util.Map<java.lang.String,?
extends Tag> value)
Put all the entries from the given map into this map.
|
CompoundTagBuilder |
putByte(java.lang.String key,
byte value)
Put the given key and value into the compound tag as a
ByteTag .
|
CompoundTagBuilder |
putByteArray(java.lang.String key,
byte[] value)
Put the given key and value into the compound tag as a
ByteArrayTag .
|
CompoundTagBuilder |
putDouble(java.lang.String key,
double value)
Put the given key and value into the compound tag as a
DoubleTag .
|
CompoundTagBuilder |
putFloat(java.lang.String key,
float value)
Put the given key and value into the compound tag as a
FloatTag .
|
CompoundTagBuilder |
putInt(java.lang.String key,
int value)
Put the given key and value into the compound tag as an
IntTag .
|
CompoundTagBuilder |
putIntArray(java.lang.String key,
int[] value)
Put the given key and value into the compound tag as a
IntArrayTag .
|
CompoundTagBuilder |
putLong(java.lang.String key,
long value)
Put the given key and value into the compound tag as a
LongTag .
|
CompoundTagBuilder |
putShort(java.lang.String key,
short value)
Put the given key and value into the compound tag as a
ShortTag .
|
CompoundTagBuilder |
putString(java.lang.String key,
java.lang.String value)
Put the given key and value into the compound tag as a
StringTag .
|
public static CompoundTagBuilder create()
public CompoundTagBuilder put(java.lang.String key, Tag value)
key
- they keyvalue
- the valuepublic CompoundTagBuilder putByteArray(java.lang.String key, byte[] value)
ByteArrayTag
.
key
- they keyvalue
- the valuepublic CompoundTagBuilder putByte(java.lang.String key, byte value)
ByteTag
.
key
- they keyvalue
- the valuepublic CompoundTagBuilder putDouble(java.lang.String key, double value)
DoubleTag
.
key
- they keyvalue
- the valuepublic CompoundTagBuilder putFloat(java.lang.String key, float value)
FloatTag
.
key
- they keyvalue
- the valuepublic CompoundTagBuilder putIntArray(java.lang.String key, int[] value)
IntArrayTag
.
key
- they keyvalue
- the valuepublic CompoundTagBuilder putInt(java.lang.String key, int value)
IntTag
.
key
- they keyvalue
- the valuepublic CompoundTagBuilder putLong(java.lang.String key, long value)
LongTag
.
key
- they keyvalue
- the valuepublic CompoundTagBuilder putShort(java.lang.String key, short value)
ShortTag
.
key
- they keyvalue
- the valuepublic CompoundTagBuilder putString(java.lang.String key, java.lang.String value)
StringTag
.
key
- they keyvalue
- the valuepublic CompoundTagBuilder putAll(java.util.Map<java.lang.String,? extends Tag> value)
value
- the map of tagspublic CompoundTag build()
public CompoundTag build(java.lang.String name)
name
- the name of the tag