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(); } }
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(); } }