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
+5 -4
View File
@@ -70,7 +70,7 @@ export interface BlockRef {
readonly x: number;
readonly y: number;
readonly z: number;
// the biome of its column and that biome's season, see ServerWorld.biome_at
// the biome at the block and that biome's season, see ServerWorld.biome_at
readonly biome: Id;
readonly season: Season;
// tile data, any json value. saved with the world, never sent to clients
@@ -358,10 +358,11 @@ export interface ServerWorld {
// whether the chunk the column is in was ever generated, so reading its blocks generates nothing. for code that
// reaches far, like a walk along something long, which can stop at the rest: nobody has built anything there
is_loaded(x: number, z: number): boolean;
// the column's biome, like "bworld:plains", and that biome's season. in chunks that aren't loaded it's what
// the biome at a block, like "bworld:plains", and that biome's season, like neoforge's level.getBiome(pos). one per
// block across and every 4 blocks up, see docs/modding/worldgen/biomes.md. in chunks that aren't loaded it's what
// generation makes there, which takes a while the first time
biome_at(x: number, z: number): Id;
season_at(x: number, z: number): Season;
biome_at(x: number, y: number, z: number): Id;
season_at(x: number, y: number, z: number): Season;
// the dimension's blocks go from min_y up to max_y - 1. outside them get_block is air and nothing can be placed
readonly min_y: number;
readonly max_y: number;