World shape for dimension

This commit is contained in:
2026-11-06 22:49:43 -03:00
parent 7458a2d42a
commit 818ce22dd6
60 changed files with 749 additions and 349 deletions
+3
View File
@@ -58,6 +58,9 @@ export interface ClientContext {
// the column's biome and its season, undefined when the chunk isn't loaded
biome_at(x: number, z: number): Id | undefined;
season_at(x: number, z: number): Season | undefined;
// the dimension's blocks go from min_y up to max_y - 1
readonly min_y: number;
readonly max_y: number;
// ticks since 06:00 of day 1, see ServerWorld.time
readonly time: number;
};
+3
View File
@@ -362,6 +362,9 @@ export interface ServerWorld {
// generation makes there, which takes a while the first time
biome_at(x: number, z: number): Id;
season_at(x: 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;
readonly seed: string;
// ticks since 06:00 of day 1. a day is 36000 ticks (06:00 to 18:00), a night 12000
readonly time: number;
+4
View File
@@ -54,6 +54,10 @@ export interface FeatureChunk {
readonly x: number;
readonly z: number;
readonly seed: string;
// the dimension's blocks go from min_y up to max_y - 1, get_block is undefined outside them and set_block does
// nothing
readonly min_y: number;
readonly max_y: number;
// seeded from the seed, chunk and feature id
readonly rng: { next(): number };
// seeded from the seed and name alone, the same in every chunk. for things decided across chunks, like trees