Pressing recipes

This commit is contained in:
2026-10-15 12:32:16 -03:00
parent 74c315bdfc
commit 7faa070d83
15 changed files with 335 additions and 35 deletions
+1
View File
@@ -35,6 +35,7 @@ export interface RecipeCategory {
const MOD_CATALYSTS: Record<string, string[]> = {
"farmersdelight:cooking": ["farmersdelight:cooking_pot"],
"farmersdelight:cutting": ["farmersdelight:cutting_board"],
"create:pressing": ["create:mechanical_press"],
};
// the base game's, in the order their tabs go, like jei's vanilla plugin
+3 -3
View File
@@ -22,8 +22,8 @@ export function outputs(recipe: Recipe): Ingredient[] {
case "smithing":
return [{ ids: [recipe.result], count: 1 }];
default: {
// one item or stack, or a list of them, like what a cutting board cuts something into
const output = recipe.result ?? recipe.output;
// one item or stack, or a list of them, like what a cutting board cuts something into or a press presses
const output = recipe.result ?? recipe.output ?? recipe.results;
return [output].flat().flatMap((output): Ingredient[] => {
if (typeof output === "string") return [{ ids: [output], count: 1 }];
if (output && typeof output.id === "string") return [stack(output)];
@@ -56,7 +56,7 @@ export function inputs(recipe: Recipe, tags: TagApi): Ingredient[] {
}
}
// the items in a mod recipe's fields besides its type and result: each item or #tag in a list is an ingredient (a list
// the items in a mod recipe's fields besides its type and results: each item or #tag in a list is an ingredient (a list
// in a list is one ingredient any of whose items fit), and a field that's one item is an extra, like a container
export function mod_recipe_inputs(recipe: Recipe, tags: TagApi): { grid: Ingredient[]; extras: Ingredient[] } {
const grid: Ingredient[] = [];