MixRecipeManager
Link to mixrecipemanager
A MixRecipeManager
is used to modify existing high oven mix recipe, including those added by ModTweaker.
导入相关包
Link to 导入相关包
Better be safe than sorry and import the package
ZenScript Copyimport mods.tcomplement.highoven.MixRecipeManager;
Getting a
Link to getting-a-mixrecipemanager
The HighOven
handler can give you a MixRecipeManager
:
ZenScript Copy// HighOven.manageMixRecipe(ILiquidStack output, ILiquidStack input);
var manager = HighOven.manageMixRecipe(<liquid:steel>);
output
is the output of the mix recipe to modifyinput
(Optional) is the input of the mix recipe to modify. Ifnull
or unspecified, any mix recipe producing the output will be affected
Removing additives
Link to removing-additives
You can use a MixRecipeManager
to remove certain additives from the affected mix recipe. Be carefull, for removals are always enforced. This means whatever way to add an additive that would add an additive you remove, will be prevented.
This may have surprising results with oredict entries. Since oredict entries are added as-is to the mix recipe (it is not expanded to a list of IItemStack
but looked for when checking the recipes), removing an item will block all oredict entries it belongs to.
Generally speaking, if you remove something specific (say, an IItemStack
with transformers) but an (single) additive addition would allow what you removed plus some other things (say, a more generic IItemStack
), the whole addition will be cancelled, preventing said other things from being accepted by the High Oven.
方法 | Info |
---|---|
方法 removeOxidizer(IIngredient oxidizer) | Info Forefully remove the oxidizer from the affected MixRecipe |
方法 removeReducer(IIngredient reducer) | Info Forefully remove the reducer from the affected MixRecipe |
方法 removePurifier(IIngredient reducer) | Info Forefully remove the purifier from the affected MixRecipe |
All those methods return the same instance they were called one, allowing method chaining.
Adding additives to existing MixRecipe
Link to adding-additives-to-existing-mixrecipe
You can add additives to all mix recipe matched by the MixRecipeManager
. Be careful, as removals have priority (see above).
方法 | Info |
---|---|
方法 addOxidizer(@NotNull IIngredient oxidizer, int consumeChance) | Info Add the oxidizer with the specified consume chance (in percent) |
方法 addReducer(@NotNull IIngredient reducer, int consumeChance) | Info Add the reducer with the specified consume chance (in percent) |
方法 addPurifier(@NotNull IIngredient purifier, int consumeChance) | Info Add the purifier with the specified consume chance (in percent) |
All those methods return the same instance they were called one, allowing method chaining.
Warning
Link to warning
Creating a MixRecipeManager
that does not match any mix recipes will not trigger any warning, because there's no way to tell which mix recipes will be added (script parsing happens before mix recipe registration). If you're MixRecipeManager
has no effect, first check it it actually matches a mix recipe