Recipe loading conditions
See original GitHub issueWe could extend the recipe json format to allow conditionally skipping the loading of some recipes.
Example use case: loading certus quartz crystal -> certus quartz dust grinding recipes when AE2 is loaded.
A possible extension could look like this:
// Standard MI recipe format
{
"type": "modern_industrialization:macerator",
"eu": 2,
"duration": 200,
"item_inputs": { "tag": "c:certus_quartz_crystals" },
"item_outputs": { "item": "appliedenergistics2:certus_quartz_dust" },
// Additional conditions, the recipe will be skipped if the conditions fail.
"fabric:conditions": { "mod": "appliedenergistics2" }
}
The challenge is picking the exact format, designing an API that allows defining custom conditions and providing a set of useful conditions (mod loaded, AND, OR, others?).
Issue Analytics
- State:
- Created 2 years ago
- Comments:10 (5 by maintainers)
Top Results From Across the Web
Fabric Recipe Conditions (FRC) - Mods - Minecraft - CurseForge
Fabric Recipe Conditions is a library that adds the ability to load recipes conditionally. You may be familiar with Forge's recipe system.
Read more >Recipe Requirements - Bush Cooking
Every recipe MUST be linked to a recipe contributor page, more information can be found about there here. There must be a minimum...
Read more >Conditionally-Loaded Data - Forge Documentation
Currently, conditional loading is implemented for recipes and advancements. For any conditional recipe or advancement, a list of conditions to datum pair is ......
Read more >recipes.pdf
Description A recipe prepares your data for modeling. We provide an ... Only rows where the condition evaluates to TRUE are.
Read more >Carbohydrate-loading diet - Mayo Clinic
Carbohydrate loading is done the week before a high-endurance activity. One to three days before the event, increase your carbohydrate intake to about...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You can probably put the failed ones in a HashSet/Map and print a summary? JsonElement and its derivatives implement equals() and hashCode() like the java collection framework.
100 recipes not loaded because {"mod_loaded": "foobar"} is false
Good luck getting a player to enable debug if your recipes aren’t appearing in their environment. 😃
Hmmm yes I meant
JsonElement
. 😄If that happens we’d probably get rid of the API, or replace it with a codec equivalent.
RebornCore has a similar system and it works with KubeJS. I think the priority of 1100 is to run after RC’s handler, so if we use the default priority we should be fine. Will obviously test it in production (i.e. AOF4).