3D biomes

This commit is contained in:
2026-11-07 12:13:43 -03:00
parent b726ce9695
commit 22191d260c
53 changed files with 874 additions and 316 deletions
+3 -2
View File
@@ -46,7 +46,7 @@ export interface FeatureJson {
type: string;
config?: Record<string, unknown>;
placement?: PlacementJson[];
// only where the column is one of these biomes
// only where the biome at the position is one of these
biomes?: string | string[];
step?: FeatureStep;
}
@@ -233,7 +233,8 @@ export function compile_feature(
for (const position of positions) {
if (
biomes &&
!(inside(chunk, position.x, position.z) && biomes.has(chunk.biome_at(position.x, position.z)))
!(inside(chunk, position.x, position.z) &&
biomes.has(chunk.biome_at(position.x, position.y, position.z)))
) {
continue;
}