Move effects into the modding api

This commit is contained in:
2026-10-02 11:53:44 -03:00
parent 4309c700d2
commit e5dcb97643
33 changed files with 458 additions and 109 deletions
+3
View File
@@ -7,6 +7,7 @@ import {
type SpawnJson,
type TagJson,
validate_block,
validate_effect,
validate_entity,
validate_item,
validate_manifest,
@@ -75,6 +76,7 @@ function load_mod(mods_dir: string, id: string): LoadedMod {
spawns: [],
entities: [],
entity_models: [],
effects: [],
tags: [],
textures: [],
texture_files: new Map(),
@@ -126,6 +128,7 @@ function load_mod(mods_dir: string, id: string): LoadedMod {
load_data("items", "item", validate_item, mod.items);
load_data("recipes", "recipe", validate_recipe, mod.recipes);
load_data("entities", "entity", validate_entity, mod.entities);
load_data("effects", "effect", validate_effect, mod.effects);
for (const file of walk(`${dir}/models`, ".geo.json")) {
const path = `models/${file}`;
+1
View File
@@ -34,6 +34,7 @@ export async function pack_mod(mod: LoadedMod): Promise<Uint8Array<ArrayBuffer>>
spawns: mod.spawns.map((s) => s.json),
entities: mod.entities.map((e) => e.json),
entity_models: mod.entity_models.map((m) => m.json),
effects: mod.effects.map((e) => e.json),
tags: mod.tags.map((t) => t.json),
},
scripts,