Class CompoundTag
java.lang.Object
org.moddingx.launcherlib.nbt.tag.CompoundTag
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an empty compound tag.CompoundTag(Map<String, Tag> elements) Creates a new compound tag with the given contents. -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Removes all elements from this tag.copy()Makes a copy of this tag.booleanGets a value from this tag.bytegetCompound(String key) doublefloatintlongshortbooleanGets whether this tag contains a value assigned to the given key.booleanGets whether this tag contains a value assigned to the given key that is of typetype.inthashCode()iterator()keys()Gets a set of all keys in this tag.voidmerge(CompoundTag tag) Puts all values from the givenCompoundTaginto thisCompoundTag, recursively merging entries, where both tags contain aCompoundTag.Puts a new value into this tag.Puts a new value into this tag.voidPuts multiple values into this tag.voidputAll(CompoundTag tag) Puts multiple values into this tag.voidvoidvoidvoidvoidvoidvoidRemoves the value assigned to the given key.intsize()Gets the size of this tag.stream()toString()type()Gets theTagTypefor this tag.Methods inherited from interface Iterable
forEach, spliterator
-
Constructor Details
-
CompoundTag
public CompoundTag()Creates an empty compound tag. -
CompoundTag
-
-
Method Details
-
type
-
copy
Description copied from interface:TagMakes a copy of this tag. For immutable tags, this may return the same object. -
equals
-
hashCode
-
toString
-
size
public int size()Gets the size of this tag. -
has
Gets whether this tag contains a value assigned to the given key. -
has
-
get
Gets a value from this tag.- Throws:
NoSuchElementException- if the given key does not exist.
-
put
-
put
-
putAll
Puts multiple values into this tag. -
putAll
-
merge
Puts all values from the givenCompoundTaginto thisCompoundTag, recursively merging entries, where both tags contain aCompoundTag. -
remove
-
clear
public void clear()Removes all elements from this tag. -
keys
-
getByte
-
getShort
-
getInt
-
getLong
-
getFloat
-
getDouble
-
getString
-
getList
-
getCompound
-
putByte
-
putShort
-
putInt
-
putLong
-
putFloat
-
putDouble
-
putString
-
iterator
-
stream
-