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
+4
View File
@@ -10,6 +10,7 @@ import { EverythingRegistry } from "./everything_registry.ts";
import { ModLoadError } from "./mod_loader.ts";
import { loading_mod } from "./hooks.ts";
import { compile_generator } from "./worldgen/generator.ts";
import type { WorldShape } from "./world_shape.ts";
import type { Biome } from "./worldgen/biomes.ts";
import {
compile_feature,
@@ -27,6 +28,8 @@ export interface WorldgenSources {
ores: OreJson[][];
// the noise settings the world uses. it and data features come from mods' data, which is already registered
generator: string;
// the dimension's, which the generator fills
shape: WorldShape;
}
// a feature before it's put in order
@@ -41,6 +44,7 @@ interface Pending {
export async function load_worldgen(sources: WorldgenSources): Promise<WorldgenSetup> {
const setup: WorldgenSetup = {
shape: sources.shape,
generator: compile_generator(sources.generator),
ores: sources.ores,
features: [],