mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-18 11:54:59 -04:00
cloud renderer: don't try to calculate clouds height in nether
This commit is contained in:
parent
71e7ad544b
commit
c825d9434e
@ -89,6 +89,9 @@ class CloudRenderer(
|
|||||||
sky.profile.clouds::maxDistance.observe(this, instant = true) { this.maxDistance = it }
|
sky.profile.clouds::maxDistance.observe(this, instant = true) { this.maxDistance = it }
|
||||||
connection::state.observe(this) {
|
connection::state.observe(this) {
|
||||||
if (it == PlayConnectionStates.SPAWNING) {
|
if (it == PlayConnectionStates.SPAWNING) {
|
||||||
|
if (!sky.effects.clouds) {
|
||||||
|
return@observe
|
||||||
|
}
|
||||||
// reset clouds
|
// reset clouds
|
||||||
position = Vec2i(Int.MIN_VALUE)
|
position = Vec2i(Int.MIN_VALUE)
|
||||||
for ((index, layer) in this.layers.withIndex()) {
|
for ((index, layer) in this.layers.withIndex()) {
|
||||||
@ -203,7 +206,7 @@ class CloudRenderer(
|
|||||||
|
|
||||||
private fun calculateCloudsColor(): Vec3 {
|
private fun calculateCloudsColor(): Vec3 {
|
||||||
var weather = connection.world.weather
|
var weather = connection.world.weather
|
||||||
if (connection.world.dimension?.effects?.weather != true) {
|
if (!sky.effects.weather) {
|
||||||
weather = WorldWeather.NONE
|
weather = WorldWeather.NONE
|
||||||
}
|
}
|
||||||
val time = sky.time
|
val time = sky.time
|
||||||
|
Loading…
x
Reference in New Issue
Block a user