Exemplo n.º 1
0
        public NbtCompoundTag(string name, INbtStream sourceStream)
        {
            children_ = new List <KeyValuePair <string, INbtTag> >();
            tags_     = new Dictionary <string, INbtTag>();
            Name      = name;
            source_   = sourceStream;
            index_    = -1;

            while (sourceStream.MoveNext())
            {
                var tag = sourceStream.CurrentValue;
                if (tag.Type == NbtTagType.EndTag)
                {
                    break;
                }
                KeyValuePair <string, INbtTag> pair = new KeyValuePair <string, INbtTag>(tag.Name, tag);
                children_.Add(pair);
                tags_.Add(tag.Name, tag);
            }
        }
Exemplo n.º 2
0
 public static INbtTag FromReader(string name, INbtStream source)
 {
     return(new NbtCompoundTag(name, source));
 }