Fix locale loading, post-fall generation, and initial block distance

- Fix locale default value parsing (Boolean → String)
- Move first block 3 blocks ahead after fall to avoid platform overlap
- Reduce initial generation from 5 to 3 blocks for better spacing
This commit is contained in:
loki 2026-04-09 12:53:45 +02:00
parent aaf72f0990
commit 2f63b14d11
3 changed files with 14 additions and 4 deletions

View file

@ -111,7 +111,17 @@ public class GeneratorCleanup {
// Regenerate first block // Regenerate first block
Location spawn = generator.state.playerSpawn; Location spawn = generator.state.playerSpawn;
if (spawn != null) { if (spawn != null) {
// Place first block ahead of spawn based on heading direction
Location blockSpawn = spawn.clone().add(0, -1, 0); Location blockSpawn = spawn.clone().add(0, -1, 0);
// Move block forward based on heading
switch (dev.loki.loparkour.config.Option.HEADING) {
case NORTH -> blockSpawn.add(0, 0, -3);
case SOUTH -> blockSpawn.add(0, 0, 3);
case WEST -> blockSpawn.add(-3, 0, 0);
case EAST -> blockSpawn.add(3, 0, 0);
}
generator.generateFirst(spawn, blockSpawn); generator.generateFirst(spawn, blockSpawn);
} }
} }

View file

@ -35,8 +35,8 @@ public class LifecycleTickManager {
generator.state.start = java.time.Instant.now(); generator.state.start = java.time.Instant.now();
} }
// Generate initial blocks // Generate initial blocks (reduced from GENERATION_LEAD to avoid too far generation)
generator.generate(GENERATION_LEAD); generator.generate(3);
} }
/** /**

View file

@ -474,7 +474,7 @@ default-values:
lang: lang:
enabled: true enabled: true
default: "en" default: en
chat: chat:
enabled: true enabled: true