Package com.sk89q.jnbt
Class NBTUtils
java.lang.Object
com.sk89q.jnbt.NBTUtils
Deprecated.
JNBT is being removed for lin-bus in WorldEdit 8.
A class which contains NBT-related utility methods.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <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
-