-
Notifications
You must be signed in to change notification settings - Fork 55
Recipe Defaults
EMI's recipe tree cannot work as conveniently as it does without mods informing EMI on how to break down trees by default. The way this is achieved is by providing a list of "defaults" for recipes that should automatically expanded. The simplest form of this is a list of recipe identifiers, the outputs of which should assume that they're created by that recipe, and should expand into it. Using this system, mods and modpacks can specify default recipes to make the experience convenient for players.
By itself, EMI provides recipe defaults for all vanilla recipes. Certain choices are made to consider what is and isn't a base resource. For instance, iron ingots, while made in a furnace, are considered "base resources" and do not have any recipe defaults. In Botania, mana steel also does not have a recipe default, despite having only one way to be made. The discretion of what is and isn't a base resource and what is a component is up to the discretion of a mod or modpack developer.
Adding recipe defaults is done by creating a file in a resource pack (note: not a data pack, EMI is client sided) at assets/emi/recipe/defaults/[modid].json
, replacing [modid] with your mod id, or some unique identifier for your pack. A simple example of exclusions can be seen below.
{
"added": [
"minecraft:stone",
"minecraft:melon",
"minecraft:ender_chest"
]
}
Manually creating these files is, said lightly, too much work. However EMI provides a pretty reasonable way to generate the lists in game. If you go into the EMI config and enable "dev mode" and "highlight defaulted" under the dev section, you will get a green highlight in the index over every item that has a recipe default. You can then search your mod @modname
and go through each item, assigning recipe defaults or skipping over, using the "set as recipe default" button or related hotkeys. You can also go through your tags and use the recipe default hotkey. At the end of this process, you can access the list of recipes in your .minecraft
/run folder in a file called emi.json
. emi.json
contains all of your favorites, your lookup history, and recipe defaults. recipe_defaults
is an object of all the defaults created, and can be copied to a file in a resource pack like the one above. This can be tested by deleting the entries in your emi.json
, or the file itself, and joining the game again to make sure the items still have defaults.