Beispiel #1
0
 public virtual void Load(NbtReader reader, INbtContainerNode parent)
 {
     Parent = parent;
     if (parent == null || parent.Type != NbtType.List)
     {
         reader.ReadType(); // Skip type byte
         Name = reader.ReadString();
     }
 }
Beispiel #2
0
        public override void Load(NbtReader reader, INbtContainerNode parent)
        {
            base.Load(reader, parent);
            var listType = reader.ReadType();
            int length   = reader.ReadInt32();

            for (int i = 0; i < length; i++)
            {
                INbtNode node = NodeFactory.CreateNode(listType);
                node.Load(reader, this);
                Children.Add(node);
            }
        }