Interface ChunkProvider
- All Known Implementing Classes:
StreamingTerrain.MemoryChunkProvider
public interface ChunkProvider
Supplies and persists
TerrainChunks for a StreamingTerrain. Implementations decide where
chunks come from: procedurally generated, bundled resources, Storage, or the network. A
provider must return a (possibly empty) chunk for any coordinate so the world is seamless.-
Method Summary
Modifier and TypeMethodDescriptionloadChunk(int cx, int cz) Loads (or generates) the chunk at the given chunk coordinates.voidsaveChunk(TerrainChunk chunk) Persists a dirty chunk being evicted from memory.
-
Method Details
-
loadChunk
Loads (or generates) the chunk at the given chunk coordinates. Never returns null. -
saveChunk
Persists a dirty chunk being evicted from memory. No-op for read-only/procedural sources.
-