Ejemplo n.º 1
0
        internal override void ReadBinary(NBTBinaryReader br)
        {
            _tagList.Clear();
            _listTagType = (TagType)br.ReadByte();
            int count = br.ReadInt32();

            _tagList = new List <TagBase>();
            for (int i = 0; i < count; i++)
            {
                TagBase nbt = TagBase.CreateNewTag(_listTagType, null);
                nbt._parent = this;
                nbt.ReadBinary(br);
                _tagList.Add(nbt);
            }
        }
Ejemplo n.º 2
0
        public static TagBase ReadNamedTag(NBTBinaryReader br)
        {
            byte type = br.ReadByte();

            if (type == 0)
            {
                return(new TagEnd());
            }
            else
            {
                string  n   = br.ReadString();
                TagBase nbt = CreateNewTag((TagType)type, n);
                nbt.ReadBinary(br);
                return(nbt);
            }
        }
Ejemplo n.º 3
0
 internal override void ReadBinary(NBTBinaryReader br)
 {
     _value = br.ReadByte();
 }