Block registry api

This commit is contained in:
2026-11-12 20:41:13 -03:00
parent e7fe663746
commit 76802ed430
39 changed files with 499 additions and 100 deletions
+2 -2
View File
@@ -49,10 +49,10 @@ Deno.test("an item with a model is drawn with it, in the model's own textures, p
Deno.removeSync(dir, { recursive: true });
});
Deno.test("check-mods reports an item's model that doesn't exist", () => {
Deno.test("check-mods reports an item's model that doesn't exist", async () => {
const dir = mods_with({ textures: { "0": "bworld:oak_planks" }, elements: [HANDLE] });
Deno.removeSync(`${dir}/copper_tools/models/wrench.json`);
const errors = load_and_check(dir).find((mod) => mod.id === "copper_tools")!.report.errors.join("\n");
const errors = (await load_and_check(dir)).find((mod) => mod.id === "copper_tools")!.report.errors.join("\n");
assert(errors.includes("model copper_tools:wrench doesn't exist"), errors);
Deno.removeSync(dir, { recursive: true });
});