updateChunk
Creates or replaces a chunk's dense voxel grid and/or per-voxel states for the given app and coordinates, records each provided voxel state as an individual voxel update, and asynchronously uploads the chunk to the CDN. WRITES world state. A whole-chunk write: every voxel edit recorded for the chunk at or before it is superseded and removed, so the chunk reads back as written (Chunk.voxelsUpdatedAt; Application API v2.70.0). A client that saves a grid it read earlier therefore overwrites edits made since that read. Leaves chunkState and LODs untouched. Requires an app token for the app and either the 'manage_apps' permission on the app (resolved via its org; super admins bypass) or the voxel edit permission for this chunk that updateVoxel checks (app access, the tier's update_voxel_data, and update_voxel_data on the most specific grid covering the chunk). Throws FORBIDDEN otherwise, and for a chunk only the app's world grid covers while the app's wilderness is closed (App.wildernessWritesOpen false).
updateChunk(
input: ChunkUpdateInput!
): Chunk!
Arguments
updateChunk.input ● ChunkUpdateInput! non-null input
Type
Chunk object
A persisted chunk of an app's voxel world. Holds an optional packed voxel-type grid for 16x16x16 chunks (voxels, one byte per voxel), sparse per-voxel state overrides and recorded edits (voxelStates; voxel positions and types are app-defined signed 16-bit values, so an app may address its chunks however it likes), an optional opaque chunk-level state blob (chunkState), and level-of-detail meshes (lods). Returned by getChunk/getChunksByDistance and written by updateChunk/updateChunkState/updateChunkLods.