예제 #1
0
 public RegionChunkDataNode(RegionFile regionFile, int x, int z)
 {
     _regionFile = regionFile;
     _x = x;
     _z = z;
     _container = new CompoundTagContainer(new TagNodeCompound());
 }
예제 #2
0
 public RegionChunkDataNode(RegionFile regionFile, int x, int z)
 {
     _regionFile = regionFile;
     _x          = x;
     _z          = z;
     _container  = new CompoundTagContainer(new TagNodeCompound());
 }
        protected override void ExpandCore()
        {
            if (_tree == null)
            {
                NBTFile file = new NBTFile(_path);
                _tree = new NbtTree();
                _tree.ReadFrom(file.GetDataInputStream(_compressionType));

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

            var list = new SortedList <TagKey, TagNode>();

            foreach (var item in _tree.Root)
            {
                list.Add(new TagKey(item.Key, item.Value.GetTagType()), item.Value);
            }

            foreach (TagNode tag in list.Values)
            {
                TagDataNode node = TagDataNode.CreateFromTag(tag);
                if (node != null)
                {
                    Nodes.Add(node);
                }
            }
        }
예제 #4
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);
            }
        }
예제 #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);
                }
            }
        }
예제 #6
0
        protected override void ExpandCore()
        {
            if (_tree == null)
            {
                NBTFile file = new NBTFile(_path);
                _tree = new NbtTree();
                _tree.ReadFrom(file.GetDataInputStream(_compressionType));

                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);
                }
            }
        }
 private NbtFileDataNode(string path, CompressionType compressionType)
 {
     _path            = path;
     _compressionType = compressionType;
     _container       = new CompoundTagContainer(new TagNodeCompound());
 }
예제 #8
0
 private NbtFileDataNode(string path, CompressionType compressionType)
 {
     _path = path;
     _compressionType = compressionType;
     _container = new CompoundTagContainer(new TagNodeCompound());
 }
예제 #9
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);
            }
        }
예제 #10
0
        protected override void ExpandCore()
        {
            if (_tree == null) {
                NBTFile file = new NBTFile(_path);
                _tree = new NbtTree();
                _tree.ReadFrom(file.GetDataInputStream(_compressionType));

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

            var list = new SortedList<TagKey, TagNode>();
            foreach (var item in _tree.Root) {
                list.Add(new TagKey(item.Key, item.Value.GetTagType()), item.Value);
            }

            foreach (TagNode tag in list.Values) {
                TagDataNode node = TagDataNode.CreateFromTag(tag);
                if (node != null)
                    Nodes.Add(node);
            }
        }
예제 #11
0
 public TagCompoundDataNode(TagNodeCompound tag)
     : base(tag)
 {
     _container = new CompoundTagContainer(tag);
 }
예제 #12
0
 public TagCompoundDataNode(TagNodeCompound tag)
     : base(tag)
 {
     _container = new CompoundTagContainer(tag);
 }