<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [server](./server.md) &gt; [ChunkLattice](./server.chunklattice.md)

## ChunkLattice class

A lattice of chunks that represent a world's terrain.

**Signature:**

```typescript
export default class ChunkLattice 
```

## Remarks

The ChunkLattice lattice tracks the current terrain of a world, comprised of [Chunk](./server.chunk.md) instances.

## Constructors

<table><thead><tr><th>

Constructor


</th><th>

Modifiers


</th><th>

Description


</th></tr></thead>
<tbody><tr><td>

[(constructor)(world)](./server.chunklattice._constructor_.md)


</td><td>


</td><td>

Creates a new chunk lattice instance.


</td></tr>
</tbody></table>

## Methods

<table><thead><tr><th>

Method


</th><th>

Modifiers


</th><th>

Description


</th></tr></thead>
<tbody><tr><td>

[getAllChunks()](./server.chunklattice.getallchunks.md)


</td><td>


</td><td>

Get all chunks in the lattice.


</td></tr>
<tr><td>

[getBlockId(globalCoordinate)](./server.chunklattice.getblockid.md)


</td><td>


</td><td>

Get the block type id at a specific global coordinate.


</td></tr>
<tr><td>

[getBlockType(globalCoordinate)](./server.chunklattice.getblocktype.md)


</td><td>


</td><td>

Get the block type at a specific global coordinate.


</td></tr>
<tr><td>

[getChunk(originCoordinate)](./server.chunklattice.getchunk.md)


</td><td>


</td><td>

Get a chunk by its origin coordinate.


</td></tr>
<tr><td>

[hasBlock(globalCoordinate)](./server.chunklattice.hasblock.md)


</td><td>


</td><td>

Check if a block exists at a specific global coordinate.


</td></tr>
<tr><td>

[hasChunk(originCoordinate)](./server.chunklattice.haschunk.md)


</td><td>


</td><td>

Check if a chunk exists by its origin coordinate.


</td></tr>
<tr><td>

[setBlock(globalCoordinate, blockTypeId)](./server.chunklattice.setblock.md)


</td><td>


</td><td>

Set the block at a global coordinate by block type id, automatically creating a chunk if it doesn't exist. Use block type id 0 for air.


</td></tr>
</tbody></table>
