MCPcopy Create free account
hub / github.com/Bloom-Engine/engine / setBlock

Function setBlock

examples/voxel-sandbox/main.ts:60–63  ·  view source on GitHub ↗
(x: number, y: number, z: number, type: number)

Source from the content-addressed store, hash-verified

58}
59
60function setBlock(x: number, y: number, z: number, type: number): void {
61 if (x < 0 || x >= worldSizeX || y < 0 || y >= WORLD_HEIGHT || z < 0 || z >= worldSizeZ) return;
62 blocks[blockIndex(x, y, z)] = type;
63}
64
65// Simple terrain generation using sine waves
66function generateTerrain(): void {

Callers 2

generateTerrainFunction · 0.85
handleInputFunction · 0.85

Calls 1

blockIndexFunction · 0.85

Tested by

no test coverage detected