Recipe types from shared scripts and stuff

This commit is contained in:
2026-11-01 20:41:23 -03:00
parent c8b5f2a3bd
commit 65113862f7
34 changed files with 234 additions and 134 deletions
+1 -7
View File
@@ -644,10 +644,6 @@ export interface ServerFluidApi extends FluidApi {
// find and all read the recipes of types shared scripts registered
export interface RecipeApi extends RecipeLookup {
furnace_result(input: Id): { output: ItemStack; cook_time: number } | undefined;
fuel_value(item: Id): number; // burn time in ticks, 0 if it isn't fuel
is_fuel(item: Id): boolean;
is_smeltable(item: Id): boolean;
// every recipe of a mod's own type, like "bworld:cooking", as its json. copies, in load order
// deno-lint-ignore no-explicit-any
list(type: Id): any[];
@@ -726,14 +722,12 @@ export type FormResult<T> = ({ canceled: true } & Partial<T>) | ({ canceled: fal
// menus, like neoforge's: the server side of a gui, see docs/modding/inventories/menus.md
export type SlotFilter = "smeltable" | "fuel" | ((item: ItemStack) => boolean);
export interface SlotOptions {
// gui pixels from the screen's top left to the slot's 18 pixel frame
x: number;
y: number;
// what can be put in, checked on the server
filter?: SlotFilter;
filter?: (item: ItemStack) => boolean;
// can only be taken from, all at once, like the furnace result
output_only?: boolean;
// runs when a player takes from an output_only slot, before they get it. false stops them taking it