Move world generation outside the engine and into mods and data files

This commit is contained in:
2026-10-11 00:33:59 -03:00
parent afe6e03d4c
commit 3d2b235f64
118 changed files with 8250 additions and 1108 deletions
+5 -2
View File
@@ -1,8 +1,11 @@
// the base game's features, on top of the engine's terrain. runs in chunk workers and must give the same world every
// time: only chunk.rng and the noise helpers, never Math.random or the time
// the base game's features, on top of the terrain (which is data, worldgen/). runs on the server and must give the
// same world every time: only chunk.rng, chunk.random and the noise helpers, never Math.random or the time
import type { FeatureChunk, WorldgenContext } from "bworld/worldgen";
import { register_trees } from "./trees.ts";
export function setup(gen: WorldgenContext) {
// trees grow in vegetal_decoration, before the cactus looks for air in the last step
register_trees(gen);
gen.register_feature("bworld:cactus", cactus);
}