mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-17 03:15:35 -04:00
debug hud: show weather
This commit is contained in:
parent
bc1c1d1233
commit
d6fcbb25bc
@ -72,7 +72,7 @@ class World(
|
||||
var difficulty: WorldDifficulty? by watched(null)
|
||||
var hashedSeed = 0L
|
||||
var time by watched(WorldTime(this))
|
||||
var weather = WorldWeather()
|
||||
var weather by watched(WorldWeather())
|
||||
val view = WorldView(connection)
|
||||
val border = WorldBorder()
|
||||
private val random = Random
|
||||
|
@ -181,6 +181,11 @@ class DebugHUDElement(guiRenderer: GUIRenderer) : Element(guiRenderer), Layouted
|
||||
)
|
||||
}
|
||||
}
|
||||
layout += TextElement(guiRenderer, "Weather TBA").apply {
|
||||
connection.world::weather.observe(this) { // ToDo: Kutil 1.18: Allow instant fire
|
||||
text = BaseComponent("Weather r=", it.rain, ", t=", it.thunder)
|
||||
}
|
||||
}
|
||||
|
||||
layout += AutoTextElement(guiRenderer, 1) { "Fun effect: " + renderWindow.framebufferManager.world.`fun`.effect?.resourceLocation.format() }
|
||||
|
||||
|
@ -240,6 +240,8 @@ class SkyboxRenderer(
|
||||
// no daylight cycle (e.g. nether)
|
||||
return calculateBiomeAvg { it.fogColor }
|
||||
}
|
||||
// TODO: Check if wither is present
|
||||
|
||||
val weather = sky.renderWindow.connection.world.weather
|
||||
|
||||
if (weather.thunder > 0.0f) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user