Pressing recipes
This commit is contained in:
@@ -19,6 +19,7 @@ likely each is, read with `ctx.blocks.components` and `ctx.loot.table`.
|
||||
|
||||
- `scripts/categories.ts` has a category for each recipe type, like JEI's `IRecipeCategory`: its title, size, where it's
|
||||
made (`MOD_CATALYSTS` for mods' types) and where its items go. Types without one are drawn from their JSON: the items
|
||||
in their lists as ingredients, a single item (like the cooking pot's bowl) under the arrow, and their `result`.
|
||||
in their lists as ingredients, a single item (like the cooking pot's bowl) under the arrow, and their `result`,
|
||||
`output` or `results`.
|
||||
- `scripts/recipes.ts` reads what any recipe makes and takes.
|
||||
- `scripts/item_list.ts` is the item list, `scripts/recipes_screen.ts` the recipes screen.
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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[] = [];
|
||||
|
||||
Reference in New Issue
Block a user