Biome as data

This commit is contained in:
2026-10-08 13:34:32 -03:00
parent 9f0b049148
commit 7e7ac8f6f4
49 changed files with 913 additions and 224 deletions
+7
View File
@@ -7,11 +7,18 @@ import { CHUNK_AREA, CHUNK_HEIGHT, CHUNK_SIZE, SEA_LEVEL } from "$/common/consta
import { generate_raw_chunk } from "$/common/generation.ts";
import { OverworldTerrain } from "$/common/worldgen/terrain.ts";
import { pick_biome } from "$/common/worldgen/overworld.ts";
import { register_biome } from "$/common/worldgen/biomes.ts";
import { load_and_check } from "./check_mods.ts";
const seed = Deno.args[0] ?? "preview";
const out = Deno.args[1] ?? ".";
const [center_x, center_z] = [Number(Deno.args[2] ?? 0), Number(Deno.args[3] ?? 0)];
// the base game's biomes, from mods/bworld
for (const mod of load_and_check()) {
if (mod.id === "bworld") { for (const { json } of mod.biomes) register_biome(json); }
}
const NAMES = [
"bworld:stone",
"bworld:dirt",