Esempio n. 1
0
 internal override void WriteBinary(NBTBinaryWriter bw)
 {
     bw.Write(_value.Length);
     for (int i = 0; i < _value.Length; i++)
     {
         bw.Write(_value[i]);
     }
 }
Esempio n. 2
0
        public static void WriteNamedTag(TagBase tag, NBTBinaryWriter bw)
        {
            byte tagId = (byte)tag.TagType;

            bw.Write(tagId);
            if (tagId != 0)
            {
                bw.Write(tag.Name);
                tag.WriteBinary(bw);
            }
        }
Esempio n. 3
0
 internal override void WriteBinary(NBTBinaryWriter bw)
 {
     if (_tagList.Count > 0)
     {
         _listTagType = _tagList[0].TagType;
     }
     else
     {
         _listTagType = TagType.Byte;
     }
     bw.Write((byte)_listTagType);
     bw.Write(_tagList.Count);
     foreach (TagBase nbt in _tagList)
     {
         nbt.WriteBinary(bw);
     }
 }
Esempio n. 4
0
 internal override void WriteBinary(NBTBinaryWriter bw)
 {
     foreach (TagBase value in _tagMap.Values)
     {
         WriteNamedTag(value, bw);
     }
     bw.Write((byte)0);
 }
Esempio n. 5
0
 internal override void WriteBinary(NBTBinaryWriter bw)
 {
     bw.Write(_value);
 }