World gen stuff
This commit is contained in:
@@ -90,6 +90,11 @@ function compile_condition(json: SurfaceConditionJson, terrain: NoiseTerrain): C
|
||||
const at = terrain.compiler.compile(json.function);
|
||||
return (context) => context.y >= at(context.x, context.y, context.z);
|
||||
}
|
||||
case "density": {
|
||||
const value = terrain.compiler.compile(json.function);
|
||||
const test = range_test(json);
|
||||
return (context) => test(value(context.x, context.y, context.z));
|
||||
}
|
||||
case "biome": {
|
||||
const biomes = new Set(json.biome_is);
|
||||
return (context) => biomes.has(context.biome);
|
||||
|
||||
Reference in New Issue
Block a user