private void LevelFinalizeInit() { base.Initialize(); simSounds.Initialize(); simParticles.Initialize(); cloudRenderer = new CloudRenderer(capi, this); smoothedLightLevel = capi.World.BlockAccessor.GetLightLevel(capi.World.Player.Entity.Pos.AsBlockPos, EnumLightLevelType.OnlySunLight); dummySim = new WeatherSimulationRegion(this, 0, 0); dummySim.Initialize(); adjacentSims[0] = dummySim; adjacentSims[1] = dummySim; adjacentSims[2] = dummySim; adjacentSims[3] = dummySim; capi.Ambient.CurrentModifiers.InsertBefore("serverambient", "weather", blendedWeatherData.Ambient); haveLevelFinalize = true; // Pre init the clouds. capi.Ambient.UpdateAmbient(0.1f); CloudRenderer renderer = this.cloudRenderer as CloudRenderer; renderer.blendedCloudDensity = capi.Ambient.BlendedCloudDensity; renderer.blendedGlobalCloudBrightness = capi.Ambient.BlendedCloudBrightness; renderer.CloudTick(0.1f); }
private void LevelFinalizeInit() { InitDummySim(); WeatherDataAtPlayer = getWeatherDataReaderPreLoad(); WeatherDataSlowAccess = getWeatherDataReader(); simSounds.Initialize(); simParticles.Initialize(); cloudRenderer = new CloudRenderer(capi, this); smoothedLightLevel = capi.World.BlockAccessor.GetLightLevel(capi.World.Player.Entity.Pos.AsBlockPos, EnumLightLevelType.OnlySunLight); capi.Ambient.CurrentModifiers.InsertBefore("serverambient", "weather", WeatherDataAtPlayer.BlendedWeatherData.Ambient); haveLevelFinalize = true; // Pre init the clouds. capi.Ambient.UpdateAmbient(0.1f); CloudRenderer renderer = this.cloudRenderer as CloudRenderer; renderer.blendedCloudDensity = capi.Ambient.BlendedCloudDensity; renderer.blendedGlobalCloudBrightness = capi.Ambient.BlendedCloudBrightness; renderer.CloudTick(0.1f); }