Package com.sk89q.jnbt
Class NBTUtils
java.lang.Object
com.sk89q.jnbt.NBTUtils
Deprecated.
JNBT is being removed for adventure-nbt in WorldEdit 8.
A class which contains NBT-related utility methods.
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
addUUIDToMap
(Map<String, Tag<?, ?>> map, UUID uuid) Deprecated, for removal: This API element is subject to removal in a future version.useNbtUtils.addUUIDToMap(Map, UUID)
insteadstatic <T extends Tag<?,
?>>
TDeprecated.Get child tag of a NBT structure.getTypeClass
(int type) Deprecated.Gets the class of a type of tag.static int
getTypeCode
(Class<? extends Tag<?, ?>> clazz) Deprecated.Gets the type code of a tag class.static String
getTypeName
(Class<? extends Tag<?, ?>> clazz) Deprecated.Gets the type name of a tag.static Vector3
Deprecated.Read a vector from a list tag containing ideally three values: the X, Y, and Z components.
-
Method Details
-
getTypeName
Deprecated.Gets the type name of a tag.- Parameters:
clazz
- the tag class- Returns:
- The type name.
-
getTypeCode
Deprecated.Gets the type code of a tag class.- Parameters:
clazz
- the tag class- Returns:
- The type code.
- Throws:
IllegalArgumentException
- if the tag class is invalid.
-
getTypeClass
Deprecated.Gets the class of a type of tag.- Parameters:
type
- the type- Returns:
- The class.
- Throws:
IllegalArgumentException
- if the tag type is invalid.
-
toVector
Deprecated.Read a vector from a list tag containing ideally three values: the X, Y, and Z components.For values that are unavailable, their values will be 0.
- Parameters:
listTag
- the list tag- Returns:
- a vector
-
getChildTag
public static <T extends Tag<?,?>> T getChildTag(Map<String, Tag<?, throws InvalidFormatException?>> items, String key, Class<T> expected) Deprecated.Get child tag of a NBT structure.- Parameters:
items
- the map to read fromkey
- the key to look forexpected
- the expected NBT class type- Returns:
- child tag
- Throws:
InvalidFormatException
- if the format of the items is invalid
-
addUUIDToMap
@Deprecated(forRemoval=true, since="2.11.2") public static void addUUIDToMap(Map<String, Tag<?, ?>> map, UUID uuid) Deprecated, for removal: This API element is subject to removal in a future version.useNbtUtils.addUUIDToMap(Map, UUID)
insteadAdd aUUID
to a map for use in aCompoundTag
- Parameters:
map
- Map to add uuid touuid
-UUID
to add- Since:
- 2.4.0
-