Package com.sk89q.jnbt
Class CompoundTagBuilder
java.lang.Object
com.sk89q.jnbt.CompoundTagBuilder
Helps create compound tags.
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Build an unnamed compound tag with this builder's entries.static CompoundTagBuilder
create()
Create a new builder instance.Put the given key and tag into the compound tag.Put all the entries from the given map into this map.Put the given key and value into the compound tag as aByteTag
.putByteArray
(String key, byte[] value) Put the given key and value into the compound tag as aByteArrayTag
.Put the given key and value into the compound tag as aDoubleTag
.Put the given key and value into the compound tag as aFloatTag
.Put the given key and value into the compound tag as anIntTag
.putIntArray
(String key, int[] value) Put the given key and value into the compound tag as aIntArrayTag
.Put the given key and value into the compound tag as aLongTag
.putLongArray
(String key, long[] value) Put the given key and value into the compound tag as aLongArrayTag
.Put the given key and value into the compound tag as aShortTag
.Put the given key and value into the compound tag as aStringTag
.Remove the given key from the compound tag.
-
Method Details
-
put
Put the given key and tag into the compound tag.- Parameters:
key
- they keyvalue
- the value- Returns:
- this object
-
putByteArray
Put the given key and value into the compound tag as aByteArrayTag
.- Parameters:
key
- they keyvalue
- the value- Returns:
- this object
-
putByte
Put the given key and value into the compound tag as aByteTag
.- Parameters:
key
- they keyvalue
- the value- Returns:
- this object
-
putDouble
Put the given key and value into the compound tag as aDoubleTag
.- Parameters:
key
- they keyvalue
- the value- Returns:
- this object
-
putFloat
Put the given key and value into the compound tag as aFloatTag
.- Parameters:
key
- they keyvalue
- the value- Returns:
- this object
-
putIntArray
Put the given key and value into the compound tag as aIntArrayTag
.- Parameters:
key
- they keyvalue
- the value- Returns:
- this object
-
putInt
Put the given key and value into the compound tag as anIntTag
.- Parameters:
key
- they keyvalue
- the value- Returns:
- this object
-
putLongArray
Put the given key and value into the compound tag as aLongArrayTag
.- Parameters:
key
- they keyvalue
- the value- Returns:
- this object
-
putLong
Put the given key and value into the compound tag as aLongTag
.- Parameters:
key
- they keyvalue
- the value- Returns:
- this object
-
putShort
Put the given key and value into the compound tag as aShortTag
.- Parameters:
key
- they keyvalue
- the value- Returns:
- this object
-
putString
Put the given key and value into the compound tag as aStringTag
.- Parameters:
key
- they keyvalue
- the value- Returns:
- this object
-
remove
Remove the given key from the compound tag. Does nothing if the key doesn't exist.- Parameters:
key
- the key- Returns:
- this object
-
putAll
Put all the entries from the given map into this map.- Parameters:
value
- the map of tags- Returns:
- this object
-
build
Build an unnamed compound tag with this builder's entries.- Returns:
- the new compound tag
-
create
Create a new builder instance.- Returns:
- a new builder
-