Example #1
0
        public override void readTagContents(DataInput datainput)
        {
            tagType = datainput.readByte();
            int i = datainput.readInt();

            tagList = new ArrayList();
            for (int j = 0; j < i; j++)
            {
                NBTBase nbtbase = createTagOfType(tagType);
                nbtbase.readTagContents(datainput);
                tagList.add(nbtbase);
            }
        }
Example #2
0
        public static NBTTagCompound func_774_a(DataInput datainput)
        {
            NBTBase nbtbase = NBTBase.readTag(datainput);

            if (nbtbase is NBTTagCompound)
            {
                return((NBTTagCompound)nbtbase);
            }
            else
            {
                throw new IOException("Root tag must be a named compound tag");
            }
        }
Example #3
0
 public static void writeTag(NBTBase nbtbase, DataOutput dataoutput)
 {
     dataoutput.writeByte(nbtbase.getType());
     if (nbtbase.getType() == 0)
     {
         return;
     }
     else
     {
         dataoutput.writeUTF(nbtbase.getKey());
         nbtbase.writeTagContents(dataoutput);
         return;
     }
 }
Example #4
0
        public static NBTBase readTag(DataInput datainput)
        {
            byte byte0 = datainput.readByte();

            if (byte0 == 0)
            {
                return(new NBTTagEnd());
            }
            else
            {
                NBTBase nbtbase = createTagOfType(byte0);
                nbtbase.key = datainput.readUTF();
                nbtbase.readTagContents(datainput);
                return(nbtbase);
            }
        }
Example #5
0
 public static void func_771_a(NBTTagCompound nbttagcompound, DataOutput dataoutput)
 {
     NBTBase.writeTag(nbttagcompound, dataoutput);
 }
Example #6
0
 public void setTag(NBTBase nbtbase)
 {
     tagType = nbtbase.getType();
     tagList.add(nbtbase);
 }
Example #7
0
 public void setTag(string s, NBTBase nbtbase)
 {
     tagMap.put(s, nbtbase.setKey(s));
 }
Example #8
0
 public static void writeTag(NBTBase nbtbase, DataOutput dataoutput)
 {
     dataoutput.writeByte(nbtbase.getType());
     if (nbtbase.getType() == 0)
     {
         return;
     }
     else
     {
         dataoutput.writeUTF(nbtbase.getKey());
         nbtbase.writeTagContents(dataoutput);
         return;
     }
 }
Example #9
0
 public void setTag(string s, NBTBase nbtbase)
 {
     tagMap.put(s, nbtbase.setKey(s));
 }
Example #10
0
 public void setTag(NBTBase nbtbase)
 {
     tagType = nbtbase.getType();
     tagList.add(nbtbase);
 }