Skip to content

feat(map): read worlds through Falco instead of the Minestom loader - #143

Merged
theEvilReaper merged 2 commits into
mainfrom
feat/falco-chunk-loader
Aug 4, 2026
Merged

feat(map): read worlds through Falco instead of the Minestom loader#143
theEvilReaper merged 2 commits into
mainfrom
feat/falco-chunk-loader

Conversation

@TheMeinerLP

Copy link
Copy Markdown
Contributor

Swaps the chunk loader of every map instance from Minestom's AnvilLoader to net.onelitefeather:falco-anvil:1.0.0, in the game module as well as in the setup one.

Why

Falco reads a region file without serialising its readers, so several chunks can be read at the same time. A failed read throws instead of reporting the chunk as absent, which keeps the server from overwriting real map data with a freshly generated chunk.

Measured on the setup server against the same map, same machine, both loaders warm:

loader reads summed avg per chunk
minestom 361 15 422 ms 42.7 ms
falco 361 2 072 ms 5.7 ms

Summed time is used rather than wall clock because the reads were spread over a session with idle time between them, which stretches wall clock without saying anything about the loader.

What this brings with it

Closing. FalcoAnvilLoader holds its region files open and is AutoCloseable; Minestom's loader is neither. GameMapProvider keeps every loader it opens and closes them from a shutdown task, a setup closes its own in reset().

Instance registration. Aves' AbstractMapProvider#registerInstance hard-wires the Minestom loader, and the released Aves 1.16.1 has no overload taking a loader factory. GameMapProvider therefore registers its instances itself, mirroring what the Aves method does. The unreleased Aves branch feat/chunk-loader-factory adds that overload — once it ships, the private method here can go and call the Aves one again.

.gitignore. A prerequisite, not a drive-by: the unanchored data/ entry for the LuckPerms runtime directory also hid the net.onelitefeather.cygnus.setup.data Java package, so no test could ever be added there. It is now anchored to the working directories a service actually runs in (/data/, /setup/data/, /game/data/).

Tests

  • GameMapProviderIntegrationTest — lobby and game instance each get their own Falco loader, close() is repeatable
  • InstanceSetupDataIntegrationTest — the loader is attached to the instance, reset() releases it, reset() without an instance is harmless

./gradlew build green.

Not in this PR

The light engine (falco-light) and falco-instance are untouched — this is the loader swap only. Cygnus sets no chunk supplier for lighting today, which is unchanged and therefore no regression.

🤖 Generated with Claude Code

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Test results

138 files  138 suites   1m 1s ⏱️
137 tests 133 ✅  4 💤 0 ❌
414 runs  402 ✅ 12 💤 0 ❌

Results for commit dd2c1aa.

♻️ This comment has been updated with latest results.

Replace Minestom's AnvilLoader with net.onelitefeather:falco-anvil 1.0.0
for every map instance, in the game module as well as in the setup one.

Falco reads a region file without serialising its readers, and a failed
read throws instead of reporting the chunk as absent — which keeps the
server from overwriting real data with a freshly generated chunk.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@theEvilReaper
theEvilReaper force-pushed the feat/falco-chunk-loader branch from 92e056f to b17e200 Compare August 4, 2026 08:15
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@theEvilReaper
theEvilReaper merged commit 0c0ef46 into main Aug 4, 2026
7 checks passed
@theEvilReaper
theEvilReaper deleted the feat/falco-chunk-loader branch August 4, 2026 08:31
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.

2 participants