An NBT node representing a string tag type.
Inheritance: Tag
示例#1
0
文件: NbtTree.cs 项目: jaquadro/NNBT
        public NbtTree(Stream stream)
        {
            int typeByte = stream.ReadByte();
            if (typeByte == -1)
                throw new EndOfStreamException();

            TagType type = (TagType)typeByte;
            if (type == TagType.Compound) {
                Name = new TagString(stream);
                Root = new TagCompound(stream);
            }
            else {
                Name = "";
                Root = new TagCompound();
            }
        }
示例#2
0
        public NbtTree(Stream stream)
        {
            int typeByte = stream.ReadByte();

            if (typeByte == -1)
            {
                throw new EndOfStreamException();
            }

            TagType type = (TagType)typeByte;

            if (type == TagType.Compound)
            {
                Name = new TagString(stream);
                Root = new TagCompound(stream);
            }
            else
            {
                Name = "";
                Root = new TagCompound();
            }
        }