- addCurrentSnapshotUser
TimestampType addCurrentSnapshotUser(ChunkWorldPos cwp, ubyte layer)
Returns timestamp of current chunk snapshot.
Store this timestamp to use in removeSnapshotUser
Adding a user to non-existent snapshot of loaded chunk is allowed,
since a ChunkLayerSnap.init is returned for such layer.
Special TimestampType.max is returned.
- areChunksLoaded
bool areChunksLoaded(ChunkWorldPos[] positions)
Undocumented in source. Be warned that the author may not have intended to support it.
- clearModifiedChunks
void clearModifiedChunks()
Used on client to clear modified chunks instead of saving them.
- commitLayerSnapshot
void commitLayerSnapshot(ChunkWorldPos cwp, WriteBuffer writeBuffer, TimestampType currentTime, ubyte layer)
Undocumented in source. Be warned that the author may not have intended to support it.
- getChunkSnapshot
Nullable!ChunkLayerSnap getChunkSnapshot(ChunkWorldPos cwp, ubyte layer, Flag!"Uncompress" uncompress)
returned value isNull if chunk is not loaded/added
If uncompress is Yes then tries to convert snapshot to uncompressed.
If has users, then uncompressed snapshot copy is returned. Original will not be uncompressed.
- getModifiedChunks
ModifiedChunksRange getModifiedChunks()
Undocumented in source. Be warned that the author may not have intended to support it.
- hasSnapshot
bool hasSnapshot(ChunkWorldPos cwp, ubyte layer)
Undocumented in source. Be warned that the author may not have intended to support it.
- isChunkAdded
bool isChunkAdded(ChunkWorldPos cwp)
Undocumented in source. Be warned that the author may not have intended to support it.
- isChunkLoaded
bool isChunkLoaded(ChunkWorldPos cwp)
Undocumented in source. Be warned that the author may not have intended to support it.
- iterateChunkSnapshotsAddUsers
SnapshotIterator iterateChunkSnapshotsAddUsers(ChunkWorldPos cwp)
Undocumented in source. Be warned that the author may not have intended to support it.
- loadChunk
void loadChunk(ChunkWorldPos cwp)
Undocumented in source. Be warned that the author may not have intended to support it.
- numTrackedChunks
size_t numTrackedChunks()
Undocumented in source. Be warned that the author may not have intended to support it.
- onSnapshotLoaded
void onSnapshotLoaded(ChunkWorldPos cwp, ChunkLayerItem[] layers, bool markAsModified)
Internal. Called by code which loads chunks from storage.
- removeSnapshotUser
void removeSnapshotUser(ChunkWorldPos cwp, TimestampType timestamp, ubyte layer)
Generic removal of snapshot user. Removes chunk if numUsers == 0.
Use this to remove added snapshot user. Use timestamp returned from addCurrentSnapshotUser.
Removing TimestampType.max is no-op.
- setLayerInfo
void setLayerInfo(ubyte layer, ChunkLayerInfo info)
Undocumented in source. Be warned that the author may not have intended to support it.
- unloadChunk
void unloadChunk(ChunkWorldPos cwp)
Undocumented in source. Be warned that the author may not have intended to support it.