Skip to content

System Overview

Liparakis edited this page Jul 12, 2026 · 4 revisions

Chunkis replaces the authoritative chunk persistence path with a Chunkis-managed pipeline.

The current system covers mutation tracking, save-time snapshot capture, CIS storage, synthetic load NBT, restore replay, vanilla full-chunk client delivery, CIS migration, and vanilla MCA migration.

Module Ownership

  • common owns shared models, codecs, compression, and the debug model.
  • storage owns persistence mechanics.
  • migration owns CIS version transitions.
  • fabric owns Minecraft integration and runtime behavior.

Runtime Orchestration

  • Save interception and shutdown flushing are handled by ChunkisMod and storage mixins.
  • Load interception and restoration route through ThreadedAnvilChunkStorageMixin, ChunkSerializerMixin, and ChunkRestorer.
  • Restored chunk state is delivered through vanilla ChunkDataS2CPacket; ChunkHolderMixin replays pending entities before that packet is sent.

Key Entry Points

  • fabric/src/main/java/io/liparakis/chunkis/ChunkisMod.java
  • fabric/src/main/java/io/liparakis/chunkis/mixin/storage/ThreadedAnvilChunkStorageMixin.java
  • fabric/src/main/java/io/liparakis/chunkis/mixin/storage/ChunkSerializerMixin.java
  • fabric/src/main/java/io/liparakis/chunkis/world/restoration/core/ChunkRestorer.java

Current Sharp Edges

  • Documentation must use the active module names: common, storage, migration, and fabric.
  • Save ownership is selective. Vanilla reads remain available, while vanilla writes are cancelled only for Chunkis-owned saves.
  • Runtime safety depends on ownership claims, persisted bases, and restore suppression working together.

Verification

Behavior is validated through Fabric mixins, entrypoints, storage tests, migration tests, and game tests covering reload, migration, and asynchronous save behavior.

Clone this wiki locally