An NBT node representing a string tag type.
Inheritance: Tag
Exemplo n.º 1
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();
            }
        }
Exemplo n.º 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();
            }
        }