public override void StartServerSide(ICoreServerAPI api) { this.api = api; treeSupplier = new WgenTreeSupplier(api); if (DoDecorationPass) { api.Event.InitWorldGenerator(initWorldGen, "standard"); api.Event.InitWorldGenerator(initWorldGenForSuperflat, "superflat"); api.Event.ChunkColumnGeneration(OnChunkColumnGen, EnumWorldGenPass.Vegetation, "standard"); api.Event.GetWorldgenBlockAccessor(OnWorldGenBlockAccessor); } }
public override void StartServerSide(ICoreServerAPI api) { this.api = api; treeSupplier = new WgenTreeSupplier(api); api.Event.ChunkColumnGeneration(OnChunkColumnGen, EnumWorldGenPass.Vegetation); api.Event.GetWorldgenBlockAccessor(OnWorldGenBlockAccessor); api.Event.SaveGameLoaded += GameWorldLoaded; // Call our loaded method manually if the server is already running (happens when mods are reloaded at runtime) if (api.Server.CurrentRunPhase == EnumServerRunPhase.RunGame) { GameWorldLoaded(); } }