minecraft-clone / src /types /chunk.ts
TomatitoToho's picture
Upload src/types/chunk.ts with huggingface_hub
6d1ddc4 verified
Raw
History Blame Contribute Delete
548 Bytes
export interface ChunkPosition {
x: number;
z: number;
}
export interface ChunkSection {
y: number;
blocks: Uint16Array; // 16x16x16 blocks
dirty: boolean;
light: {
sky: Uint8Array;
block: Uint8Array;
};
}
export interface ChunkData {
position: ChunkPosition;
sections: ChunkSection[];
biomeMap: Uint8Array; // 16x16x4 biomes
heightmaps: {
motionBlocking: Uint16Array; // 16x16 height values
motionBlockingNoLeaves: Uint16Array;
oceanFloor: Uint16Array;
};
entities: Entity[];
lastUpdate: number;
}