5. Custom Crafting Recipes - Paneedah/VMW-Balance-Packs GitHub Wiki
Custom Crafting Recipes
The mod has two sources of recipes, the default built-in recipes (which are compiled into the jar), and the optional custom recipe slot. That slot is found in config/mw/crafting. The file must be named craftingmappings.json.
Here is an example of a proper file:
{
"recipes": [
{
"entryName": "mw:bullet50ae",
"craftingGroup": "BULLET",
"recipe": [
{
"entryName": "minecraft:acacia_fence",
"isOreDictionary": false,
"count": 4
}
]
}
]
}
The JSON file is constructed to have an array of recipes. For instance, in the file above the recipe is:
{
"entryName": "mw:bullet50ae",
"craftingGroup": "BULLET",
"recipe": [
{
"entryName": "minecraft:acacia_fence",
"isOreDictionary": false,
"count": 4
}
]
}
Where:
- entryName: Specifies the ID of the item we are making a recipe for (using standard MC IDs)
- craftingGroup: Specifies the crafting group. Options are (GUN, ATTACHMENT_NORMAL, ATTACHMENT_MODIFICATION, BULLET, MAGAZINE)
- recipe: A JSON array that contains all the components of the recipe.
The individual components of the recipes are slightly more complicated. For recipes that do not use OreDictionary, they should look as follows:
{
"entryName": "minecraft:acacia_fence",
"isOreDictionary": false,
"count": 4
}
Where:
- entryName: is the MC item that we want to use to craft the item
- isOreDictionary: tells us if we want to use OreDictionary. If your format looks like the one above, leave this to false as OreDictionary recipes require a special formatting.
- count: how many of the item is required
For components that you wish to use OreDictionary for:
{
"entryName": "steel_ingot",
"defaultItem": "mw:SteelIngot",
"isOreDictionary": true,
"count": 4
}
Where:
- entryName: is the OreDictionary entry
- isOreDictionary: leave as true
- count: how many of the item is required
- defaultItem: what item will be returned when disassembled