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
+3
View File
@@ -21,6 +21,7 @@ import { check_references, load_order, type LoadedMod, type ModReport } from "$/
import { png_size, texture_size_problem } from "$/common/bmod.ts";
import { type TextureJson, validate_texture_json } from "$/common/texture_animation.ts";
import { type LootTableJson, validate_loot_table } from "$/common/loot.ts";
import { validate_biome } from "$/common/worldgen/biomes.ts";
import { dirname } from "@std/path";
export { load_order, type LoadedMod, type ModReport };
@@ -82,6 +83,7 @@ function load_mod(mods_dir: string, id: string): LoadedMod {
effects: [],
tags: [],
loot_tables: [],
biomes: [],
textures: [],
texture_files: new Map(),
texture_json: new Map(),
@@ -147,6 +149,7 @@ function load_mod(mods_dir: string, id: string): LoadedMod {
load_data("recipes", "recipe", validate_recipe, mod.recipes);
load_data("entities", "entity", validate_entity, mod.entities);
load_data("effects", "effect", validate_effect, mod.effects);
load_data("worldgen/biomes", "biome", validate_biome, mod.biomes);
for (const file of walk(`${dir}/models`, ".geo.json")) {
const path = `models/${file}`;