예제 #1
0
 public WorldManager(Server server)
 {
     _Chunks = new ChunkSet();
     Server = server;
     ChunksToRecalculate = new ConcurrentQueue<ChunkLightUpdate>();
     Load();
 }
예제 #2
0
        public WorldManager(Server server)
        {
            EnsureDirectory();

            Generator = new ChunkGenerator(this, GetSeed());
            ChunkManager = new WorldChunkManager(this);
            _Chunks = new ChunkSet();
            Server = server;

            InitializeSpawn();
            InitializeThreads();
            InitializeWeather();
        }
예제 #3
0
        public WorldManager(Server server)
        {
            _chunks = new ChunkSet();
            Server = server;
            ChunksToRecalculate = new ConcurrentQueue<ChunkLightUpdate>();
            ChunksToSave = new ConcurrentQueue<ChunkBase>();
            Load();

            // Create the light brightness table
            double d = 0.0;
            for(int i = 0; i < 16; i++)
            {
                double d1 = 1.0 - (double)i / 15.0;
                _lightBrightnessTable[i] = ((1.0 - d1) / (d1 * 3.0 + 1.0)) * (1.0 - d) + d;
            }
        }
예제 #4
0
 public WorldManager(Server server)
 {
     _Chunks = new ChunkSet();
     Server = server;
     Load();
 }