mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-18 11:54:59 -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 difficulty: WorldDifficulty? by watched(null)
|
||||||
var hashedSeed = 0L
|
var hashedSeed = 0L
|
||||||
var time by watched(WorldTime(this))
|
var time by watched(WorldTime(this))
|
||||||
var weather = WorldWeather()
|
var weather by watched(WorldWeather())
|
||||||
val view = WorldView(connection)
|
val view = WorldView(connection)
|
||||||
val border = WorldBorder()
|
val border = WorldBorder()
|
||||||
private val random = Random
|
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() }
|
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)
|
// no daylight cycle (e.g. nether)
|
||||||
return calculateBiomeAvg { it.fogColor }
|
return calculateBiomeAvg { it.fogColor }
|
||||||
}
|
}
|
||||||
|
// TODO: Check if wither is present
|
||||||
|
|
||||||
val weather = sky.renderWindow.connection.world.weather
|
val weather = sky.renderWindow.connection.world.weather
|
||||||
|
|
||||||
if (weather.thunder > 0.0f) {
|
if (weather.thunder > 0.0f) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user