Skip to content

Replace network save snapshots instead of appending old entries - #1788

Open
voidsipp wants to merge 1 commit into
CyclopsMC:master-26-ltsfrom
voidsipp:fix/network-save-snapshot
Open

voidsipp wants to merge 1 commit into
CyclopsMC:master-26-ltsfrom
voidsipp:fix/network-save-snapshot

Conversation

@voidsipp

@voidsipp voidsipp commented Nov 9, 2026

Copy link
Copy Markdown

NetworkWorldStorage.beforeSave appends to networkParams without clearing the previous snapshot. Repeated saves retain stale networks and duplicate current entries.

Build a complete snapshot first, then replace the saved list. Network.toParams also preserves toRead until deferred loading completes, so an early startup save cannot discard the pending paths or crash state. A failed snapshot producer leaves the prior snapshot intact. This does not reconnect cables or rebuild networks.

The full build and all 1,102 game tests pass locally, including three new serialization regressions. Validation used NeoForge 126 and the deployed CyclopsCore 1.31.4/CommonCapabilities 2.11.8 plus bundled compat classes, substituted through a local init script because the declared GitHub Packages dependencies returned 401. The modified methods also pass a native modpack fixture. No graphical gameplay or performance benchmark was performed.

@rubensworks

Copy link
Copy Markdown
Member

Thanks for the PR, but could you first explain the bug/problem you are running into?
Ideally, an issue is first opened, and then a PR.

This branch has not been deployed

No deployments
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