From f34a6b7c9fa0c690d86ed4d13dd3e85ed601e9bf Mon Sep 17 00:00:00 2001 From: minjaesong Date: Sun, 21 Jan 2024 00:49:01 +0900 Subject: [PATCH] a comment to save future futile attemps --- .../torvald/terrarum/modulebasegame/worldgenerator/Worldgen.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/net/torvald/terrarum/modulebasegame/worldgenerator/Worldgen.kt b/src/net/torvald/terrarum/modulebasegame/worldgenerator/Worldgen.kt index 4ee0c2b60..f5ae1617b 100644 --- a/src/net/torvald/terrarum/modulebasegame/worldgenerator/Worldgen.kt +++ b/src/net/torvald/terrarum/modulebasegame/worldgenerator/Worldgen.kt @@ -142,6 +142,8 @@ object Worldgen { */ fun getChunkGenStrip(world: GameWorld): Pair { val start = (0.00342f * world.height - 3.22f).floorToInt().coerceAtLeast(1) + // this value has to extend up, otherwise the player may spawn into the chopped-off mountaintop + // this value has to extend down into the rock layer, otherwise, if the bottom of the bottom chunk is dirt, they will turn into grasses return start - 1 to start + 6 }