public Enumerator(BetaChunkManager cm)
 {
     _cm   = cm;
     _enum = _cm.RegionManager.GetEnumerator();
     _enum.MoveNext();
     _region = _enum.Current;
 }
Beispiel #2
0
        private void OpenDimension(int dim)
        {
            string path = Path;

            if (dim == Dimension.DEFAULT)
            {
                path = IO.Path.Combine(path, _REGION_DIR);
            }
            else
            {
                path = IO.Path.Combine(path, "DIM" + dim);
                path = IO.Path.Combine(path, _REGION_DIR);
            }

            if (!Directory.Exists(path))
            {
                Directory.CreateDirectory(path);
            }

            ChunkCache cc = new ChunkCache();

            RegionManager    rm = new RegionManager(path, cc);
            BetaChunkManager cm = new BetaChunkManager(rm, cc);
            BlockManager     bm = new BlockManager(cm);

            _regionMgrs[dim] = rm;
            _chunkMgrs[dim]  = cm;
            _blockMgrs[dim]  = bm;
        }
 /// <summary>
 /// Creates a new <see cref="BetaChunkManager"/> instance from another.
 /// </summary>
 /// <param name="cm">A <see cref="BetaChunkManager"/> to get a <see cref="RegionManager"/> and <see cref="ChunkCache"/> from.</param>
 public BetaChunkManager(BetaChunkManager cm)
 {
     _regionMan = cm._regionMan;
     _cache     = cm._cache;
 }