mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-16 10:55:01 -04:00
sun, moon: check if renderable in dimension
This commit is contained in:
parent
2b1d89811a
commit
c669a1dafe
@ -73,6 +73,13 @@ class MoonRenderer(
|
||||
return Random((day / MoonPhases.VALUES.size).murmur64()).nextFloat(0.0f, 0.2f)
|
||||
}
|
||||
|
||||
override fun draw() {
|
||||
if (!sky.properties.moon) {
|
||||
return
|
||||
}
|
||||
super.draw()
|
||||
}
|
||||
|
||||
companion object {
|
||||
private val MOON_PHASES = minecraft("environment/moon_phases").texture()
|
||||
|
||||
|
@ -53,6 +53,13 @@ class SunRenderer(
|
||||
return Random(day.murmur64()).nextFloat(0.0f, 0.2f)
|
||||
}
|
||||
|
||||
override fun draw() {
|
||||
if (!sky.properties.sun) {
|
||||
return
|
||||
}
|
||||
super.draw()
|
||||
}
|
||||
|
||||
companion object {
|
||||
private val SUN = minecraft("environment/sun").texture()
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user