JSON Recipes - einsteinsci/betterbeginnings GitHub Wiki
#JSON Recipe Loading
BetterBeginnings has its own custom JSON-based recipe loading system, suited for simple customization, much like Minetweaker (but not nearly as advanced). All recipes for BetterBeginnings crafting and smelting are stored in this system, and can be edited in their corresponding main.json files. However, regular crafting cannot be changed this way.
JSON loading is only available for 0.9.7 and above, and is thus not available for 1.7.10. Luckily, Minetweaker support is available on that version instead, and offers much more freedom in customization.
##Disclaimer JSON recipe loading is in no way intended to replace Minetweaker compatibility! It is designed for minor, quick edits for users that want to change their recipes without too much hassle. It also allows for customized recipes for Minecraft versions that Minetweaker is not updated to.
##JSON Loading Availability JSON loading is supported for these options:
- Kiln: Recipes
- Brick Oven: Shaped and shapeless recipes. Currently does not support Ore Dictionary items.
- Smelter: Recipes
- Campfire: Recipes
- Advanced Crafting: Advanced recipes
- Smelter Boosters: Items that qualify as boosters for use in a smelter, and their corresponding boost values. The configs for this are in a separate folder than the smelter recipes
- Infusion Repair Items: The item consumed during infusion repair for each enchantment, and how much per level. Currently does not support Ore Dictionary items.
- Recipe Removal: The items listed here will have any vanilla crafting or smelting recipes completely removed, depending on which list the item is on. If there is no recipe for the item, the mod won't try to remove anything. This is useful for moving a recipe from the vanilla furnace or crafting table to one of the BetterBeginnings alternatives. There is no
main.jsonfor recipe removal, only custom recipes. Recipes removed through normal config will not show up here.
##Folder Structure
In the /config/betterbeginnings folder, there are several other folders denoting different areas of customization. In each folder is a main.json and custom.json file. All the default recipes for BetterBeginnings and vanilla Minecraft will be stored in main.json. custom.json is intentionally left empty to ease customized recipes.
###main.json
This file contains all the recipes for BetterBeginnings and vanilla Minecraft. You can add and remove recipes to this file with no risk of harm. However, the recipes will not be mod-checked, so if an item is not found, the recipe will be skipped. main.json does not support includes or dependency-checking, so the fields includes and modDependencies will be ignored.
###custom.json
This file is for any custom recipes you want to add. Any recipes listed here will be added after main.json, if that means anything. custom.json does not support dependency-checking, but does allow for includes (see below). The field modDependencies will be ignored.
###Includes
In custom.json, you can specify a number of additional files to be included in the custom recipes. This works much like #include does in C++; the recipes will be inserted as if they were part of custom.json. For example, if "ThermalExpansion.json" is added to the includes in custom.json, BetterBeginnings will search for a file named ThermalExpansion.json in the same folder, and add any recipes found in it. The included file follows the same syntax as custom.json. Includes do support mod dependencies (see below), but do not allow for other includes (nesting). The field includes will be ignored.
###Mod Dependency Checking
Include files can specify one or more mods to check for. If any of the mods listed is not installed, the recipes in the file will be ignored completely. Simply specify the modID of the mod to check for in the modDependencies field of the include file. For example, "modDependencies":["betterbeginnings"] (obviously there's no need to check for BetterBeginnings in real scenarios).
##Item Format
Many configs will need you to specify items within them. This is mostly done through the JsonLoadedItem format:
{
"itemName": "betterbeginnings:leatherStrip",
"isOreDictionary": false,
"isWildcard": false,
"damage": 0,
"stackSize": 3
}
For most cases, the itemName field will use the format modid:itemname, just like referring to items in-game via commands. The damage field allows you to specify a metadata value to apply to the item. If applicable, a stackSize field allows you to set the stack size. It defaults to 0, not 1, so be sure to include it if necessary.
The isWildcard allows you to use the wildcard damage value to allow for all damage types in recipes. If it's set to true, damage will be ignored.
###Ore Dictionary The item format also allows for ore dictionary entries in recipes. An example item:
{
"itemName": "nuggetIron",
"isOreDictionary": true,
"isWildcard": false,
"damage": 0,
"stackSize": 2
}
If the isOreDictionary field is set to true, the itemName field no longer specifies the actual item name, but instead the Ore Dictionary entry. Additionally, the isWildcard and damage fields become meaningless.
Since the Ore Dictionary item format specifies multiple items in a single item entry, it only works in situations where multiple items make sense. Situations like various furnace outputs do not support Ore Dictionary, and may cause crashes if the recipe attempts to use Ore Dictionary items in the output.