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); } } }
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); } }
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); } } }
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()); }
//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); } }
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); } }
public TagCompoundDataNode(TagNodeCompound tag) : base(tag) { _container = new CompoundTagContainer(tag); }