NuclearCraft: Overhauled
Link to nuclearcraft-overhauled
All recipes involve five sets of information - item inputs, fluid inputs, item outputs, fluid outputs and extra info. The first four are clearly the ingredients and products involved in the recipe, and the extra info contains data such as processing time and power for machines, the base depletion time, heat gen, efficiency, criticality, and radiation level of solid fission fuels, etc.
All parts of the recipe are simply listed in the method - the internal NC code will deal with splitting it up into those five categories and packaging the information up into a recipe.
Chance Ingredients
Link to chance-ingredients
Item and fluid outputs can have additional info attached to them - specifically, info that can randomise the output stack size somewhat. This additional info is given using NC's 'chance ingredients'.
The size of the stack produced on each process is randomly assigned from a binomial distribution specified by the chance info. The percentage and ingredient stack size play the roles of the probability and number of trials, respectively. A minimum stack size can also be specified - without this, the minimum stack size is simply 0.
For ChanceFluidIngredients, a 'stack difference' must also be specified, which determines the difference in size between the possible stacks (for ChanceItemIngredients, this is effectively 1). For example, a ChanceFluidIngredient for an ingredient of size 500, with a stack difference of 150 and minimum stack size of 50, will produce 50, 200, 350 or 500 millibuckets of the fluid.
Note: ChanceItemIngredient
and ChanceFluidIngredient
count as IIngredient
for the purpose of recipes in NuclearCraft: Overhauled
ChanceItemIngredient
Link to chanceitemingredient
Creation
Link to creation
ZenScript Copymods.nuclearcraft.ChanceItemIngredient.create(IIngredient ingredient, int chancePercent, @Optional int minStackSize);
Примеры
Link to примеры
ZenScript CopyChanceItemIngredient.create(<minecraft:coal>*2, 25);
ChanceItemIngredient.create(<ore:dustGlowstone>*3, 60, 2);
Extra Methods
Link to extra-methods
ZenScript CopyIIngredient getInternalIngredient();
int getChancePercent();
int getMinStackSize();
ChanceFluidIngredient
Link to chancefluidingredient
These can be used anywhere where regular ILiquidStack
is used.
Creation
Link to creation-1
ZenScript Copymods.nuclearcraft.ChanceFluidIngredient.create(IIngredient ingredient, int chancePercent, int stackDiff, @Optional int minStackSize);
Примеры
Link to примеры-1
ZenScript CopyChanceFluidIngredient.create(<liquid:water>*1500, 35, 300);
ChanceFluidIngredient.create(<liquid:oil>*1000, 80, 200, 400);
Extra Methods
Link to extra-methods-1
ZenScript CopyIIngredient getInternalIngredient();
int getChancePercent();
int getStackDiff();
int getMinStackSize();
Recipe Additions
Link to recipe-additions
Recipe Methods will specify itemInput
for Item Inputs.
Recipe Methods will specify itemOutput
for Item Outputs.
Recipe Methods will specify fluidInput
for Fluid Inputs.
Recipe Methods will specify fluidOutput
for Fluid Outputs.
Recipe Methods will specify blockInput
for Block Inputs.
Recipe Methods will specify blockOutput
for Block Outputs.
Note: blockInput
and blockOutput
must be the IItemStack
/IIngredient
versions of blocks
Item Inputs
Link to item-inputs
IItemStack
: <minecraft:gunpowder>
* 4
IOreDictEntry
: <ore:ingotIron>
* 2
null
: null
Item Outputs
Link to item-outputs
IItemStack
: <minecraft:gunpowder>
* 4
IOreDictEntry
: <ore:ingotIron>
* 2
ChanceItemIngredient
: <ore:gemDiamond>
* 5, 75
null
: null
Fluid Inputs
Link to fluid-inputs
ILiquidStack
: <liquid:lava>
* 1500
null
: null
Fluid Outputs
Link to fluid-outputs
ILiquidStack
: <liquid:lava>
* 1500
ChanceLiquidStack
: <liquid:water>
* 2000, 40, 250, 500
null
: null
Block Inputs
Link to block-inputs
IItemStack
: <minecraft:dirt>
* 4
IOreDictEntry
: <ore:blockIron>
* 2
null
: null
Block Outputs
Link to block-outputs
IItemStack
: <minecraft:dirt>
* 4
IOreDictEntry
: <ore:blockIron>
* 2
null
: null
Recipe Removals
Link to recipe-removals
When specifying a recipe to remove, all that is required is for either all input or output ingredients to be specified. Ingredient chance data is not required. Again, the items must come first, followed by the fluids.
You may also want to remove all of a certain type of recipe - to do this, simply use the removeAllRecipes()
method.