Class NBTBase

java.lang.Object
net.minecraft.src.NBTBase
Direct Known Subclasses:
NBTTagByte, NBTTagByteArray, NBTTagCompound, NBTTagDouble, NBTTagEnd, NBTTagFloat, NBTTagInt, NBTTagIntArray, NBTTagList, NBTTagLong, NBTTagShort, NBTTagString

public abstract class NBTBase extends Object
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String[]
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    NBTBase(String par1Str)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract NBTBase
    Creates a clone of the tag.
    boolean
    equals(Object par1Obj)
     
    static NBTBase
    func_130104_b(DataInput par0DataInput, int par1)
     
    abstract byte
    Gets the type byte for the tag.
    Gets the name corresponding to the tag, or an empty string if none set.
    static String
    getTagName(byte par0)
    Returns the string name of a tag with the specified type, or 'UNKNOWN' if invalid.
    int
     
    static NBTBase
    newTag(byte par0, String par1Str)
    Creates and returns a new tag of the specified type, or null if invalid.
    static NBTBase
    readNamedTag(DataInput par0DataInput)
    Reads and returns a tag from the given DataInput, or the End tag if no tag could be read.
    setName(String par1Str)
    Sets the name for this tag and returns this for convenience.
    static void
    writeNamedTag(NBTBase par0NBTBase, DataOutput par1DataOutput)
    Writes the specified tag to the given DataOutput, writing the type byte, the UTF string key and then calling the tag to write its data.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • NBTTypes

      public static final String[] NBTTypes
  • Constructor Details

    • NBTBase

      protected NBTBase(String par1Str)
  • Method Details

    • getId

      public abstract byte getId()
      Gets the type byte for the tag.
    • setName

      public NBTBase setName(String par1Str)
      Sets the name for this tag and returns this for convenience.
    • getName

      public String getName()
      Gets the name corresponding to the tag, or an empty string if none set.
    • readNamedTag

      public static NBTBase readNamedTag(DataInput par0DataInput) throws IOException
      Reads and returns a tag from the given DataInput, or the End tag if no tag could be read.
      Throws:
      IOException
    • func_130104_b

      public static NBTBase func_130104_b(DataInput par0DataInput, int par1) throws IOException
      Throws:
      IOException
    • writeNamedTag

      public static void writeNamedTag(NBTBase par0NBTBase, DataOutput par1DataOutput) throws IOException
      Writes the specified tag to the given DataOutput, writing the type byte, the UTF string key and then calling the tag to write its data.
      Throws:
      IOException
    • newTag

      public static NBTBase newTag(byte par0, String par1Str)
      Creates and returns a new tag of the specified type, or null if invalid.
    • getTagName

      public static String getTagName(byte par0)
      Returns the string name of a tag with the specified type, or 'UNKNOWN' if invalid.
    • copy

      public abstract NBTBase copy()
      Creates a clone of the tag.
    • equals

      public boolean equals(Object par1Obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object