Skip to content

Harden world loading against missing void generator#142

Merged
minoneer merged 6 commits into
masterfrom
harden-world-generator
Jun 11, 2026
Merged

Harden world loading against missing void generator#142
minoneer merged 6 commits into
masterfrom
harden-world-generator

Conversation

@minoneer

Copy link
Copy Markdown
Member

Summary

Fixes the silent failure where the skyblock world runs with the vanilla generator and regular terrain generates around islands (reported as "creates an overworld underneath my island"). Bukkit never persists plugin generators, and createWorld() silently returns already-loaded worlds unchanged — so a world loaded by the server (level-name) or a generator-less Multiverse registration stayed broken with no diagnostics.

  • Detect & warn: WorldManager now verifies the attached generator after world load/creation and logs an actionable SEVERE banner (bukkit.yml snippet, recovery command) when it cannot be attached.
  • Self-heal bukkit.yml: uSkyBlock registers worlds.<name>.generator: uSkyBlock in bukkit.yml when missing — the only mechanism covering every load path, including the default world. Add-only-when-missing, never overwrites admin values, fail-soft on read-only or unparseable files.
  • Self-heal Multiverse: registrations missing the generator string are repaired (set + persisted) at startup; foreign generators are warned about but respected.
  • Docs: new "World loading and the void generator" section in the admin setup guide, including symptoms and recovery via /usb chunk regen.

Explicitly excluded: persisting a flat-void stem via WorldType.FLAT — on 1.21.2+ that hardcodes sea level to -63 and breaks sea-level-anchored mob spawning (squid/dolphin/fish, glow squid, drowned, turtles) plus the guardian-habitat mechanic (same reason BSkyBlock reverted FLAT, BentoBox#2593).

Test Plan

  • 17 new unit tests (WorldManagerTest, BukkitYmlGeneratorMappingTest, MultiverseCoreHookTest); full :uSkyBlock-Core:test suite green (176 tests)
  • E2E on Paper 1.21.11: level-name=skyworld without mapping → boot 1 logs both banners and writes both bukkit.yml entries; boot 2 starts clean with the server loading the default world through the plugin generator
  • Fresh-install auto-configuration from scratch (clean bukkit.yml, no worlds)

🤖 Generated with Claude Code

@minoneer

Copy link
Copy Markdown
Member Author

CI note: the build_and_test failure is unrelated to this change — it is dependency-resolution rot surfaced by the first cold-cache build since March (old papermc.io/repo URL now returns 403, repo.mvdw-software.com is unreachable). 7699c8d0 fixes the Paper repo URL and scopes the flaky repos so they can only affect their own artifacts; Multiverse and everything else now resolve cleanly. The one remaining cold-cache failure is MVdWPlaceholderAPI:3.0.1-SNAPSHOT, whose only host is the dead mvdw repo — that dependency is being addressed properly in #134 (placeholder modernization) rather than re-hosted here.

@minoneer minoneer force-pushed the harden-world-generator branch from 7699c8d to c8ea85d Compare June 11, 2026 17:42
@minoneer minoneer merged commit 84f9e24 into master Jun 11, 2026
1 check passed
@minoneer minoneer deleted the harden-world-generator branch June 11, 2026 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant