Class IngredientCalculation
-
public final class IngredientCalculationbalugaq
-
-
Method Summary
Modifier and Type Method Description final List<Container>getInputs()final List<Container>getIntermediates()final DoublegetOutputAmount()Output amount: In basic recipe calculation -> the amount of main product output per recipe cycle
In final calculation results -> the total amount of main product to be produced (after scaling)
final voidsetOutputAmount(Double value)Output amount: In basic recipe calculation -> the amount of main product output per recipe cycle
In final calculation results -> the total amount of main product to be produced (after scaling)
final voidmergeSubCalculation(IngredientCalculation other)Merge sub-recipe calculation results (only merge raw materials and along products, without affecting main product amount) Used in recursive calculation to integrate inputs and along products from sub-recipes final IngredientCalculationscaleBy(Double multiplier)Scale raw materials, along products and main product amounts by multiplier final IngredientCalculationflat()Merge all the similar components and return a clone final static IngredientCalculationempty()Create an empty calculation result (empty raw materials and along products, output amount is 0) final static IngredientCalculationasIngredient(ItemStack stack)Directly convert an item stack to a basic raw material (for items without recipes) -
-
Method Detail
-
getIntermediates
final List<Container> getIntermediates()
-
getOutputAmount
final Double getOutputAmount()
Output amount:
In basic recipe calculation -> the amount of main product output per recipe cycle
In final calculation results -> the total amount of main product to be produced (after scaling)
-
setOutputAmount
final void setOutputAmount(Double value)
Output amount:
In basic recipe calculation -> the amount of main product output per recipe cycle
In final calculation results -> the total amount of main product to be produced (after scaling)
-
mergeSubCalculation
final void mergeSubCalculation(IngredientCalculation other)
Merge sub-recipe calculation results (only merge raw materials and along products, without affecting main product amount) Used in recursive calculation to integrate inputs and along products from sub-recipes
-
scaleBy
final IngredientCalculation scaleBy(Double multiplier)
Scale raw materials, along products and main product amounts by multiplier
- Parameters:
multiplier- Scaling multiplier (must be greater than 0)- Returns:
Scaled calculation result
-
flat
final IngredientCalculation flat()
Merge all the similar components and return a clone
-
empty
final static IngredientCalculation empty()
Create an empty calculation result (empty raw materials and along products, output amount is 0)
-
asIngredient
final static IngredientCalculation asIngredient(ItemStack stack)
Directly convert an item stack to a basic raw material (for items without recipes)
- Parameters:
stack- Target item stack- Returns:
Calculation result with this item as raw material
-
-
-