This page contains some example about how to include Mekanism’s custom and expanded Ingredients.
Keep in mind that since Ingredients accept multiple and different elements, they cannot be used as the output of a recipe!
While most of the time using this is unnecessary due to the magic of Implicit Casting, these are useful to have around.
Make sure to check out each ingredient’s page to see what can cast to this and what you can do with them!
The FluidStackIngredient is an Ingredient related to the use of fluids.
< recipetype : mekanism:rotary > .addRecipe ( "decondensentrate_sulfur_dioxide" , FluidStackIngredient . from ( < tag : fluids:forge:sulfur_dioxide > , 1 ) , < gas : mekanism:sulfur_dioxide > ) ;
//An alternate implementation of the above recipe is shown commented below. This implementation makes use of implicit casting to allow easier calling:
< recipetype : mekanism:rotary > .addRecipe( "decondensentrate_sulfur_dioxide" , < tag : fluids:forge:sulfur_dioxide > * 1 , < gas : mekanism:sulfur_dioxide > );
The ItemStackIngredient is a type of Ingredient that requires Items to be met.
< recipetype : mekanism:energy_conversion > .addRecipe ( "redstone_ore_to_power" , ItemStackIngredient . from ( < tag : items:forge:ores/redstone > ) , FloatingLong . create ( 45000 ) ) ;
// <tag:items:forge:ores/redstone> is also applicable here.
The GasStackIngredient is a type of ChemicalStackIngredient that requires GasStack s
import mods.mekanism.api.ingredient.ChemicalStackIngredient.GasStackIngredient;
< recipetype:mekanism:activating > .addRecipe ( "activate_water_vapor", GasStackIngredient.from ( < gas:mekanism:water_vapor > ) , < gas:mekanism:brine > ) ;
//This also works, due to implicit casting!
<recipetype:mekanism:activating>.addRecipe("activate_water_vapor", <gas:mekanism:water_vapor>, <gas:mekanism:brine>);
The PigmentStackIngredient is a type of
ChemicalStackIngredient that is related to the use of pigments in recipes.
< recipetype : mekanism:pigment_mixing > .addRecipe ( "pigment_mixing/white_dark_red_to_red" , PigmentStackIngredient . from ( < pigment : mekanism:white > ) , PigmentStackIngredient . from ( < pigment : mekanism:dark_red > * 4 ) , < pigment : mekanism:red > * 5 ) ;
//Alternate implementations of the above recipe are shown commented below. These implementations make use of implicit casting to allow easier calling:
< recipetype : mekanism:pigment_mixing > .addRecipe( "pigment_mixing/white_dark_red_to_red" , < pigment : mekanism:white > , PigmentStackIngredient . from( < pigment : mekanism:dark_red > * 4 ), < pigment : mekanism:red > * 5 );
< recipetype : mekanism:pigment_mixing > .addRecipe( "pigment_mixing/white_dark_red_to_red" , PigmentStackIngredient . from( < pigment : mekanism:white > ), < pigment : mekanism:dark_red > * 4 , < pigment : mekanism:red > * 5 );
< recipetype : mekanism:pigment_mixing > .addRecipe( "pigment_mixing/white_dark_red_to_red" , < pigment : mekanism:white > , < pigment : mekanism:dark_red > * 4 , < pigment : mekanism:red > * 5 );
The InfusionStackIngredient is a type of
ChemicalStackIngredient that is related to the use of infusion types in recipes.
< recipetype : mekanism:metallurgic_infusing > .addRecipe ( "infuse_planks" , ItemStackIngredient . from ( < item : minecraft:oak_planks > ) , InfusionStackIngredient . from ( < infuse_type : mekanism:fungi > * 10 ) , < item : minecraft:crimson_planks > ) ;
//Alternate implementations of the above recipe are shown commented below. These implementations make use of implicit casting to allow easier calling:
< recipetype : mekanism:metallurgic_infusing > .addRecipe( "infuse_planks" , < item : minecraft:oak_planks > , InfusionStackIngredient . from( < infuse_type : mekanism:fungi > * 10 ), < item : minecraft:crimson_planks > );
< recipetype : mekanism:metallurgic_infusing > .addRecipe( "infuse_planks" , ItemStackIngredient . from( < item : minecraft:oak_planks > ), < infuse_type : mekanism:fungi > * 10 , < item : minecraft:crimson_planks > );
< recipetype : mekanism:metallurgic_infusing > .addRecipe( "infuse_planks" , < item : minecraft:oak_planks > , < infuse_type : mekanism:fungi > * 10 , < item : minecraft:crimson_planks > );
The SlurryStackIngredient is a type of
ChemicalStackIngredient that is related to the use of slurries in recipes.
< recipetype : mekanism:washing > .addRecipe ( "cleaning_uranium_slurry" , FluidStackIngredient . from ( < tag : fluids:minecraft:water > , 10 ) , SlurryStackIngredient . from ( < slurry : mekanism:dirty_uranium > ) , < slurry : mekanism:clean_uranium > ) ;
//Alternate implementations of the above recipe are shown commented below. These implementations make use of implicit casting to allow easier calling:
< recipetype : mekanism:washing > .addRecipe( "cleaning_uranium_slurry" , < tag : fluids:minecraft:water > * 10 , SlurryStackIngredient . from( < slurry : mekanism:dirty_uranium > ), < slurry : mekanism:clean_uranium > );
< recipetype : mekanism:washing > .addRecipe( "cleaning_uranium_slurry" , FluidStackIngredient . from( < tag : fluids:minecraft:water > , 10 ), < slurry : mekanism:dirty_uranium > , < slurry : mekanism:clean_uranium > );
< recipetype : mekanism:washing > .addRecipe( "cleaning_uranium_slurry" , < tag : fluids:minecraft:water > * 10 , < slurry : mekanism:dirty_uranium > , < slurry : mekanism:clean_uranium > );
All Mekanism Ingredients are Implicitly castable to IData, in case you need to.