-
Notifications
You must be signed in to change notification settings - Fork 0
Developer Guide
| Area | Start with | Responsibility |
|---|---|---|
| data model | common/.../core/ChunkDelta.java |
chunk payload shape and codec contracts |
| format constants | common/.../core/model/CisConstants.java |
CIS version and encoding constants |
| storage | storage/.../io/CisStorage.java |
encode, compress, read, write, clear |
| region layout | storage/.../io/region/RegionFile.java |
32×32 region allocation and compaction |
| migration | migration/.../migrator/CisStorageMigrator.java |
versioned storage rewrite |
| tracking | fabric/.../world/tracking/state/GlobalChunkTracker.java |
live owned dirty deltas |
| save safety | fabric/.../world/tracking/ownership/DeltaPersistenceGuard.java |
reject unreconstructable payloads |
| load/restore | fabric/.../world/restoration/core/ChunkRestorer.java |
apply saved state to WorldChunk
|
| vanilla bridge | fabric/.../mixin/storage/ThreadedAnvilChunkStorageMixin.java |
load source resolution and synthetic NBT |
| MCA import | fabric/.../integration/migration/offline/PreLaunchMigrationCoordinator.java |
pre-launch authority takeover |
Ask whether the change alters stored bytes or their interpretation. If yes, bump the CIS version, add an explicit migration edge, preserve old decode support where applicable, and add a focused codec/migration test. Do not rely on Java field order or an undocumented palette layout.
Trace every caller of the ownership predicate. A new field must not accidentally cause vanilla writes to be suppressed. Keep ChunkDeltaOwnership and DeltaPersistenceGuard aligned: a payload that establishes ownership also needs a safe restoration baseline.
Keep Fabric mixins thin and move decision logic into normal classes when possible. Restore runs on the server thread; do not introduce asynchronous chunk-section, block-entity, or entity mutation. After direct section writes, section counts must represent final palette state.
Full restored chunks use vanilla ChunkDataS2CPacket. Do not add another full-delta client channel unless vanilla demonstrably cannot synchronize one narrowly defined state; document that missing state and test it against a remote client.
# Windows
gradlew.bat fabric:test
gradlew.bat fabric:build
# Linux/macOS
./gradlew fabric:test
./gradlew fabric:buildRun fabric:runGameTest when the world test server is not already using the shared test world. For runtime changes, test a real persisted world through: first load, edit, save, restart, reload, and remote-client visibility.
- Does the change preserve unknown/auxiliary metadata or explicitly state what is dropped?
- Can a sparse payload reconstruct terrain without relying on current world generation?
- Does an error include chunk coordinates, dimension/path, and operation context?
- Are writes/cancellations still gated by explicit ownership?
- Are docs and migration tests updated when the persistence contract changes?