mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-11 08:27:29 -04:00
biome cache resetting
This commit is contained in:
parent
e6c9c73bb9
commit
0bc7a7bbf6
@ -29,7 +29,6 @@ class PerformanceC(profile: RenderingProfile) {
|
||||
* Biomes may not match anymore.
|
||||
* If true, chunk receiving is way faster.
|
||||
* Only affects 19w36+ (~1.14.4)
|
||||
* ToDo: Requires rejoin to apply
|
||||
*/
|
||||
var fastBiomeNoise by BooleanDelegate(profile, false)
|
||||
|
||||
|
@ -67,6 +67,13 @@ class WorldBiomes(val world: World) : BiomeAccessor {
|
||||
|
||||
|
||||
fun resetCache() {
|
||||
// TODO
|
||||
world.lock.lock()
|
||||
for ((_, chunk) in world.chunks.chunks.unsafe) {
|
||||
for (section in chunk.sections) {
|
||||
if (section == null) continue
|
||||
section.biomes.clear()
|
||||
}
|
||||
}
|
||||
world.lock.unlock()
|
||||
}
|
||||
}
|
||||
|
@ -25,6 +25,7 @@ object DebugCommand : ConnectionCommand {
|
||||
.addChild(LiteralNode("network").addChild(
|
||||
LiteralNode("detach", executor = { it.connection.network.detach(); it.connection.util.sendDebugMessage("Now you are alone on the wire...") }),
|
||||
))
|
||||
.addChild(LiteralNode("cache").addChild(LiteralNode("biome", executor = { it.connection.world.biomes.resetCache(); it.connection.util.sendDebugMessage("Biome cache cleared!") })))
|
||||
|
||||
|
||||
private fun CommandStack.fly() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user