Better recipe api and port smithing to it
This commit is contained in:
@@ -2,7 +2,18 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
// what client scripts get, see docs/modding/gui/index.md
|
||||
import type { FluidApi, FluidVariant, Id, ItemStack, KeyCode, ModInfo, Position, Season, TagApi } from "./shared.ts";
|
||||
import type {
|
||||
FluidApi,
|
||||
FluidVariant,
|
||||
Id,
|
||||
ItemStack,
|
||||
KeyCode,
|
||||
ModInfo,
|
||||
Position,
|
||||
RecipeLookup,
|
||||
Season,
|
||||
TagApi,
|
||||
} from "./shared.ts";
|
||||
import type { LootTableJson } from "../loot.ts";
|
||||
|
||||
export type {
|
||||
@@ -82,11 +93,12 @@ export interface ClientContext {
|
||||
// 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
|
||||
// every recipe as its json (see docs/modding/resources/recipes.md), including mods' own types, in load order. copies.
|
||||
// find and all read the recipes of types shared scripts registered
|
||||
recipes: {
|
||||
// deno-lint-ignore no-explicit-any
|
||||
list(type?: Id): any[];
|
||||
};
|
||||
} & RecipeLookup;
|
||||
// every mod's block, item and entity tags
|
||||
tags: TagApi;
|
||||
// blocks drawn with code, like a shaft that turns, see docs/modding/blocks/visuals.md
|
||||
|
||||
Reference in New Issue
Block a user