Class NBTUtils

java.lang.Object
com.sk89q.jnbt.NBTUtils

@Deprecated public final class NBTUtils extends Object
Deprecated.
JNBT is being removed for lin-bus in WorldEdit 8.
A class which contains NBT-related utility methods.
  • Method Details

    • getTypeName

      public static String getTypeName(Class<? extends Tag<?,?>> clazz)
      Deprecated.
      Gets the type name of a tag.
      Parameters:
      clazz - the tag class
      Returns:
      The type name.
    • getTypeCode

      public static int getTypeCode(Class<? extends Tag<?,?>> clazz)
      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

      public static Class<? extends Tag<?,?>> getTypeClass(int type)
      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

      public static Vector3 toVector(ListTag<?,?> listTag)
      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<?,?>> items, String key, Class<T> expected) throws InvalidFormatException
      Deprecated.
      Get child tag of a NBT structure.
      Parameters:
      items - the map to read from
      key - the key to look for
      expected - the expected NBT class type
      Returns:
      child tag
      Throws:
      InvalidFormatException - if the format of the items is invalid