MixRecipeBuilder
Link to mixrecipebuilder
A MixRecipeBuilder
is used to build and add High Oven's Mix Recipe to the game.
Importing the package
Link to importing-the-package
Better be safe than sorry and import the package
ZenScript Copyimport mods.tcomplement.highoven.MixRecipeBuilder;
Getting a
Link to getting-a-mixrecipebuilder
The mods.tcomplement.highoven.HighOven
handler can give you a MixRecipeBuilder
ZenScript Copy// HighOven.newMixRecipe(ILiquidStack output, ILiquidStack input, int temp);
var builder = HighOven.newMixRecipe(<liquid:steel> * 72, <liquid:iron> * 144, 1350);
output
is the fluid and quantity to produceinput
is the fluid and quantity to consumetemp
is the minimal temperature of the high oven for the recipe to work, in Kelvin
Attributes
Link to attributes
Attribute | ZenGetter | ZenSetter | Type | Info |
---|---|---|---|---|
Attribute output | ZenGetter output | ZenSetter :heavy_check_mark: | Type ILiquidStack | Info the output produced by the MixRecipe |
Attribute input | ZenGetter input | ZenSetter :heavy_check_mark: | Type ILiquidStack | Info the input of the MixRecipe |
Attribute temperature | ZenGetter temp | ZenSetter :heavy_check_mark: | Type int | Info the minimum temperature, in Kelvin |
Attribute oxidizers | ZenGetter oxidizers | ZenSetter :x: | Type List<IIngredient> | Info the valid oxidizers for the recipe at the time the attribute is accessed |
Attribute reducers | ZenGetter reducers | ZenSetter :x: | Type List<IIngredient> | Info the valid reducers for the recipe at the time the attribute is accessed |
Attribute purifiers | ZenGetter purifiers | ZenSetter :x: | Type List<IIngredient> | Info the valid purifiers for the recipe at the time the attribute is accessed |
Methods
Method | Return type | Info |
---|---|---|
Method getOxidizerChance(IIngredient oxidizer) | Return type int | Info The chance in percent that the oxidizer is consumed, or -1 if the oxidizer is not valid |
Method getReducerChance(IIngredient reducer) | Return type int | Info The chance in percent that the reducer is consumed, or -1 if the reducer is not valid |
Method getOxidizerChance(IIngredient purifier) | Return type int | Info The chance in percent that the purifier is consumed, or -1 if the oxidizer is not valid |
Method addOxidizer(IIngredient oxidizer, int consumeChance) | Return type MixRecipeBuilder | Info Add the oxidizer with the given consume chance (in percent) |
Method addReducer(IIngredient reducer, int consumeChance) | Return type MixRecipeBuilder | Info Add the reducer with the given consume chance (in percent) |
Method addPurifier(IIngredient purifier, int consumeChance) | Return type MixRecipeBuilder | Info Add the purifier with the given consume chance (in percent) |
Method removeOxidizer(IIngredient oxidizer) | Return type MixRecipeBuilder | Info Remove the oxidizer if it had been added |
Method removeReducer(IIngredient reducer) | Return type MixRecipeBuilder | Info Remove the reducer if it had been added |
Method removePurifier(IIngredient purifier) | Return type MixRecipeBuilder | Info Remove the purifier if it had been added |
Method removeAllOxidizer() | Return type MixRecipeBuilder | Info Remove all oxidizers |
Method removeAllReducer() | Return type MixRecipeBuilder | Info Remove all reducers |
Method removeAllPurifier() | Return type MixRecipeBuilder | Info Remove all purifiers |
Method register() | Return type | Info Add a new MixRecipe with the data currently added in the MixRecipeBuilder |
All methods that return a MixRecipeBuilder
return the same instance they were called on, allowing method chaining.
How to use Once you have a MixRecipeBuilder
, add the oxidizers, reducers and purifiers for your new recipe to the builder, then register()
a recipe. A MixRecipeBuilder
can be used to register as many recipes as you want: each time you call register()
, it adds a new recipe with the infos it has at the time you call the function. This makes it easy to add recipes variant or recipes tier by incrementally adding new additives and/or increasing yield etc.
The additives supports all kind of IIngredient
: IOreDictEntry
, IItemStack
and their transformations, liquid containers etc.