Ejemplo n.º 1
0
 public RegionChunkDataNode(RegionFile regionFile, int x, int z)
 {
     _regionFile = regionFile;
     _x = x;
     _z = z;
     _container = new CompoundTagContainer(new TagNodeCompound());
 }
Ejemplo n.º 2
0
 private NbtFileDataNode(string path, CompressionType compressionType)
 {
     _path = path;
     _compressionType = compressionType;
     _container = new CompoundTagContainer(new TagNodeCompound());
 }
Ejemplo n.º 3
0
        //private TagNodeCompound _metaRoot;
        protected override void ExpandCore()
        {
            if (_tree == null) {
                NBTFile file = new NBTFile(_path);
                _tree = new NbtTree();
                _tree.ReadFrom(file.GetDataInputStream(_compressionType));

                //_metaRoot = new TagNodeCompound();

                if (_tree.Root != null) {
                    //_metaRoot.Add(_tree.Name, _tree.Root);
                    _container = new CompoundTagContainer(_tree.Root);
                }
            }

            /*foreach (TagNode tag in _metaRoot.Values) {
                TagDataNode node = TagDataNode.CreateFromTag(tag);
                if (node != null)
                    Nodes.Add(node);
            }*/

            foreach (TagNode tag in _tree.Root.Values) {
                TagDataNode node = TagDataNode.CreateFromTag(tag);
                if (node != null)
                    Nodes.Add(node);
            }
        }
Ejemplo n.º 4
0
 public TagCompoundDataNode(TagNodeCompound tag)
     : base(tag)
 {
     _container = new CompoundTagContainer(tag);
 }
Ejemplo n.º 5
0
        protected override void ExpandCore()
        {
            if (_tree == null) {
                _tree = new NbtTree();
                _tree.ReadFrom(_regionFile.GetChunkDataInputStream(_x, _z));

                if (_tree.Root != null)
                    _container = new CompoundTagContainer(_tree.Root);
            }

            foreach (TagNode tag in _tree.Root.Values) {
                TagDataNode node = TagDataNode.CreateFromTag(tag);
                if (node != null)
                    Nodes.Add(node);
            }
        }