예제 #1
0
        public WorldManager(Server server)
        {
            EnsureDirectory();

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

            InitializeSpawn();
            InitializeThreads();
            InitializeWeather();
        }
예제 #2
0
        public bool Load()
        {
            EnsureDirectory();

            //Event
            WorldLoadEventArgs e = new WorldLoadEventArgs(this);
            Server.PluginManager.CallEvent("WORLD_LOAD", e);
            if (e.EventCanceled) return false;
            //End Event

            Generator = new ChunkGenerator(this, GetSeed());
            ChunkManager = new WorldChunkManager(this);

            InitializeSpawn();
            InitializeThreads();
            InitializeWeather();
            return true;
        }
예제 #3
0
        public bool Load()
        {
            EnsureDirectory();

            //Event
            WorldLoadEventArgs e = new WorldLoadEventArgs(this);
            Server.PluginManager.CallEvent(Event.WORLD_LOAD, e);
            if (e.EventCanceled) return false;
            //End Event

            _ChunkProvider = new ChunkProvider(this);
            Generator = _ChunkProvider.GetNewGenerator(GeneratorType.Custom, GetSeed());
            ChunkManager = new WorldChunkManager(this);
            PhysicsBlocks = new ConcurrentDictionary<int, BlockBasePhysics>();

            InitializeSpawn();
            InitializeThreads();
            InitializeWeather();
            return true;
        }