This page relates to Immersive Engineering, which has built-in support!

Immersive Engineering Mineral Mix

Link to immersive-engineering-mineral-mix

Mineral Mix is a type of IRecipeManager and implements all the methods that are available to IRecipeManager's, such as removeRecipe() and removeAll().

The following script will add a mix that will output White Wool 50% of the time, Orange Wool 25% of the time, and Magenta Wool 100% of the time. The mix has a weight of 50, and a fail change of 0.5. The mix will only be available in the Overworld and will show as White Wool in Samples.

ZenScript
Copy
// <recipetype:immersiveengineering:mineral_mix>.addRecipe(string recipePath, MCWeightedItemStack[] outputs, int weight, float failChance, ResourceLocation[] dimensions, Block background)

<recipetype:immersiveengineering:mineral_mix>.addRecipe("sheep_mix", [<item:minecraft:white_wool> % 50, <item:minecraft:orange_wool> % 25, <item:minecraft:magenta_wool>], 50, 0.5, [<resource:minecraft:overworld>], <block:minecraft:white_wool>);

The following script will remove a Mix with the name "immersiveengineering:mineral/ancient_debris".

ZenScript
Copy
// <recipetype:immersiveengineering:mineral_mix>.removeByName(string name)

<recipetype:immersiveengineering:mineral_mix>.removeByName("immersiveengineering:mineral/ancient_debris");