Пример #1
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;
        }
Пример #2
0
        public bool Load()
        {
            EnsureDirectory();

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

            _chunkProvider = new ChunkProvider(this);
            _generator = _chunkProvider.GetNewGenerator(GeneratorType.Custom, GetSeed());
            PhysicsBlocks = new ConcurrentDictionary<int, BaseFallingPhysics>();

            InitializeSpawn();
            InitializeWeather();
            Running = true;
            return true;
        }
Пример #3
0
        internal bool Load()
        {
            EnsureDirectory();

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

            _chunkProvider = new ChunkProvider(this);
            _generator = _chunkProvider.GetNewGenerator("Default", GetSeed());
            PhysicsBlocks = new ConcurrentDictionary<int, BaseFallingPhysics>();

            if (_generator == null)
            {
                Logger.Log(LogLevel.Error,
                           "No ChunkGenerator found in the Plugins folder! Add the default one from CustomGenerator project and then restart the server.");
                return false;
            }

            InitializeSpawn();
            InitializeWeather();
            Running = true;
            return true;
        }