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
+6 -6
View File
@@ -487,9 +487,9 @@ function gears_mod(): string {
return mod;
}
Deno.test("tags keep their entries, renamed, and ones that don't exist here become optional", () => {
Deno.test("tags keep their entries, renamed, and ones that don't exist here become optional", async () => {
const mod = gears_mod();
const report = import_tags(
const report = await import_tags(
data({
"gears/tags/items/spinning": {
values: ["gears:gear", "minecraft:stone", "#forge:ingots/brass", { id: "other:cog", required: false }],
@@ -517,9 +517,9 @@ Deno.test("tags keep their entries, renamed, and ones that don't exist here beco
assertStringIncludes(report.warnings[0].warning, "bworld:stone");
});
Deno.test("create's pressing recipes keep their shape, with bworld's item choices, from 0.5's and 6.0's json", () => {
Deno.test("create's pressing recipes keep their shape, with bworld's item choices, from 0.5's and 6.0's json", async () => {
const mod = gears_mod();
const report = import_recipes(
const report = await import_recipes(
data({
// 0.5 named results' items "item", and an ingredient that's a list is one any of whose items fit
"gears/recipes/pressing/teeth": {
@@ -558,7 +558,7 @@ Deno.test("create's pressing recipes keep their shape, with bworld's item choice
assertEquals(report.skipped.map(({ location }) => location), ["gears:pressing/granite"]);
});
Deno.test("stonecutting recipes become bworld's, and ones it can't use are reported", () => {
Deno.test("stonecutting recipes become bworld's, and ones it can't use are reported", async () => {
const mod = gears_mod();
const cut = (ingredient: unknown, result: unknown, extra = {}) => ({
type: "minecraft:stonecutting",
@@ -566,7 +566,7 @@ Deno.test("stonecutting recipes become bworld's, and ones it can't use are repor
result,
...extra,
});
const report = import_recipes(
const report = await import_recipes(
data({
// before 1.20.5 the count is the recipe's, after it the result's. 1.21 renamed the folder
"gears/recipes/gear_from_teeth": cut({ tag: "gears:teeth" }, "gears:gear", { count: 2 }),