Recipe Editor - Library
What is this?
This modification is not a standalone addition, but a powerful tool for developers, pack creators, datapack makers, and everyone who enjoys customizing game mechanics. It provides automatic application of any changes to crafting recipes directly during game runtime.
Instead of manually overriding each existing recipe, you can create sets of rule-modifiers that are applied automatically when Minecraft starts. This guarantees compatibility with all other mods - your edits will work correctly with recipes from any additions, eliminating conflicts when multiple sources modify the same recipes.
Usage examples
Increasing crafted item quantities
Suppose you believe the standard button recipe is unfair and want to get 8 items at once instead of one. This is implemented with just a few lines of code:
{
"target_recipes": "#minecraft:buttons",
"modifiers": [
{
"type": "modify_result_item",
"function": "set_count",
"count": 8
}
]
}
Fixing compatibility issues
A common situation occurs when modifications use non-standard tags for items, leading to incompatibility of their recipes with similar items from other mods. For example, if mod "mod_xyz" uses incorrect tags for copper nuggets:
{
"target_recipes": {
"type": "namespace_equals",
"namespace": "mod_xyz"
},
"modifiers": [
{
"type": "add_alternative",
"ingredients": "mod_xyz:copper_nugget",
"alternative": {
"tag": "c:copper_nuggets"
}
}
]
}
How to use the library?
The main method of operation is through JSON files, also with Java API available for experienced developers.
Working test examples have been created to help understand the principles of building modifiers.
Documentation on JSON syntax and additional examples will help master all the tool's capabilities.