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
Location spawn = generator.state.playerSpawn;
if (spawn != null) {
// Place first block ahead of spawn based on heading direction
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);
}
}

View file

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