3D biomes
This commit is contained in:
@@ -38,7 +38,7 @@ export type FeatureStep =
|
||||
|
||||
export interface FeatureOptions {
|
||||
step?: FeatureStep;
|
||||
// only runs in chunks with one of these biomes
|
||||
// only runs in chunks with one of these biomes somewhere, at any height
|
||||
biomes?: Id | Id[];
|
||||
}
|
||||
|
||||
@@ -66,9 +66,14 @@ export interface FeatureChunk {
|
||||
// create_noise_2d(new Alea(seed + "_" + name)), cached per seed and name
|
||||
noise_2d(name: string): (x: number, z: number) => number;
|
||||
noise_3d(name: string): (x: number, y: number, z: number) => number;
|
||||
// surface height and biome, inside this chunk only
|
||||
// the column's surface height, inside this chunk only
|
||||
height_at(x: number, z: number): number;
|
||||
biome_at(x: number, z: number): Id;
|
||||
// the biome at a block, like neoforge's level.getBiome(pos), inside this chunk only. biomes are one per block
|
||||
// across and one every 4 blocks up, see docs/modding/worldgen/biomes.md. above and below the world it's the one at
|
||||
// its top or bottom
|
||||
biome_at(x: number, y: number, z: number): Id;
|
||||
// sets the biome of the 4 blocks tall cell y is in, inside this chunk only. nothing outside the world's height
|
||||
set_biome(x: number, y: number, z: number, biome: Id): void;
|
||||
get_block(x: number, y: number, z: number): Id | undefined; // inside this chunk only
|
||||
set_block(x: number, y: number, z: number, id: Id): void; // up to one chunk away, like trees
|
||||
// a data feature's type and config at x, y, z, without its placement. whether it placed anything
|
||||
@@ -77,5 +82,4 @@ export interface FeatureChunk {
|
||||
|
||||
export interface TerrainChunk extends FeatureChunk {
|
||||
set_height(x: number, z: number, height: number): void;
|
||||
set_biome(x: number, z: number, biome: Id): void;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user