-
Notifications
You must be signed in to change notification settings - Fork 0
Delta and Ownership Model
Panayiotis Stylianopoulos edited this page Jul 12, 2026
·
3 revisions
ChunkDelta is the shared state carrier for runtime mutation, persisted chunk payloads, metadata, block entities, and pending entities.
Ownership helpers determine whether a delta is merely attached state or Chunkis-owned authoritative state.
-
ChunkDeltastores the shared chunk state. -
ChunkDeltaOwnershipclassifies ownership and restorability. -
GlobalChunkTrackertracks runtime state. -
PendingVanillaSaveDecisionandStoragePreventionMixincoordinate vanilla-write suppression.
-
hasChunkisOwnedState(...)means the delta has an ownership claim. -
hasRestorableChunkisState(...)is broader: replay payloads or persistence anchors are sufficient. -
GlobalChunkTrackerkeeps dirty deltas by dimension and chunk position. - The unload cache mirrors relevant tracked state.
- An existing authoritative tracked delta can override an incoming weaker replacement.
- Vanilla writes are cancelled only when the higher-level save path marked the chunk as Chunkis-owned.
- Save persists only Chunkis-owned state.
- Load restores deltas with replay payloads or persistence anchors.
- Clean unload-cache deltas are invalidated before load and must not override storage.
It is incorrect to treat every attached delta as authoritative. Authority is established through explicit ownership and persistence state.
common/src/main/java/io/liparakis/chunkis/core/ChunkDelta.javafabric/src/main/java/io/liparakis/chunkis/world/tracking/ownership/ChunkDeltaOwnership.javafabric/src/main/java/io/liparakis/chunkis/world/tracking/state/GlobalChunkTracker.javafabric/src/main/java/io/liparakis/chunkis/mixin/storage/StoragePreventionMixin.java