Improve recipe viewer
This commit is contained in:
@@ -1,13 +1,20 @@
|
||||
# Recipe Viewer
|
||||
|
||||
A recipe viewer like Just Enough Items, as a client script. Every inventory screen gets the list of every item on its
|
||||
right, with a search box (`@mod` searches by mod, like `@farmersdelight`).
|
||||
right, with the page on top and a search box under it (`@mod` searches by mod, like `@farmersdelight`).
|
||||
|
||||
- Left click an item, or press R over any item (in the list or in a slot), for the recipes that make it.
|
||||
- Right click, or U, for the recipes that use it.
|
||||
- In the recipes, click items to follow them. Backspace or Back goes back, X closes.
|
||||
- Left click an item, or press R over any item (in the list, a slot or a recipe), for the recipes that make it.
|
||||
- Right click, or U, for the recipes that use it. The uses of a block that makes recipes, like the furnace, are all of
|
||||
the recipes made in it.
|
||||
|
||||
It reads every mod's recipes with `ctx.recipes.list()`. It knows how to draw shaped, furnace, fuel and smithing recipes,
|
||||
and draws other mods' recipe types 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`. `CATALYSTS` in `scripts/client.ts` says which block makes each
|
||||
type.
|
||||
The recipes open in a screen of their own, laid out like JEI's: a tab for each category above it, where the category is
|
||||
made down its left side, the category and the page between their arrows, then the recipes. Clicking items in it follows
|
||||
them, Backspace goes back, and Escape or the inventory key (E) returns to the inventory.
|
||||
|
||||
It reads every mod's recipes with `ctx.recipes.list()`.
|
||||
|
||||
- `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`.
|
||||
- `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.
|
||||
|
||||
Reference in New Issue
Block a user