Fluids on the recipeviewer !

This commit is contained in:
2026-10-28 13:26:56 -03:00
parent 3cc33ea10c
commit e525681328
7 changed files with 151 additions and 83 deletions
+7 -4
View File
@@ -1,9 +1,11 @@
# 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 the page on top and a search box under it (`@mod` searches by mod, like `@farmersdelight`).
A recipe viewer like Just Enough Items, as a client script. Every inventory screen gets the list of every item, then
every fluid, on its right, with the page on top and a search box under it (`@mod` searches by mod, like
`@farmersdelight`). Fluids are listed by id alone, without their data, so juice is there once and stands for every
juice.
- Left click an item, or press R over any item (in the list, a slot or a recipe), for the recipes that make it.
- Left click an item or fluid, or press R over any (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.
@@ -17,7 +19,8 @@ get a Fishing category too: clicking one shows its seasons, biomes, hours and th
its `bworld:crabpot` component and each kind of water, showing everything that water's loot table can catch and how
likely each is, read with `ctx.blocks.components` and `ctx.loot.table`. The juicer gets one for each item with the
`bworld:juiceable` component, showing the juice one of it is pressed into and how many mB, drawn in a fluid slot with
`g.fluid`.
`g.fluid`. Recipes say what fluids they make and take in `fluid_results` and `fluid_ingredients`, lists of
`{ fluid, amount }`, which only the viewer's own types use so far.
- `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