Recipe viewer for crabpots

This commit is contained in:
2026-10-12 02:39:25 -03:00
parent 726a52b91a
commit 2ebcf55ad3
9 changed files with 201 additions and 13 deletions
+14
View File
@@ -1,5 +1,6 @@
// what client scripts get, see docs/modding/gui/index.md
import type { Id, ItemStack, KeyCode, ModInfo, Position, Season, TagApi } from "./shared.ts";
import type { LootTableJson } from "../loot.ts";
export type { Id, ItemStack, KeyCode, ModInfo, Position, Season, TagApi, TagRegistry } from "./shared.ts";
@@ -42,6 +43,19 @@ export interface ClientContext {
// what a component means, like when a fish can be caught
components(id: Id): Record<Id, unknown>;
};
// every block any mod registered
blocks: {
exists(id: Id): boolean;
// the components its json lists and their params, a copy, like the server's ctx.blocks.components. for showing
// what a component does, like what a crab pot catches
components(id: Id): Record<Id, unknown>;
};
// the mods' loot table files (see docs/modding/resources/loot_tables.md), to show what they give. tables server
// scripts make with ctx.loot.register_table aren't here
loot: {
// the table's json, a copy, or undefined when no mod has a file for it
table(id: Id): LootTableJson | undefined;
};
// every recipe as its json (see docs/modding/resources/recipes.md), including mods' own types, in load order. copies
recipes: {
// deno-lint-ignore no-explicit-any