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); } }
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); } }
internal override void ReadBinary(NBTBinaryReader br) { _value = br.ReadByte(); }