Class IngredientCalculation

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final List<Container> getInputs()
      final List<Container> getIntermediates()
      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)

      final Unit setOutputAmount(Double outputAmount) 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 Unit 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
      final IngredientCalculation scaleBy(Double multiplier) Scale raw materials, along products and main product amounts by multiplier
      final IngredientCalculation flat() Merge all the similar components and return a clone
      final static IngredientCalculation empty() Create an empty calculation result (empty raw materials and along products, output amount is 0)
      final static IngredientCalculation asIngredient(ItemStack stack) Directly convert an item stack to a basic raw material (for items without recipes)
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • 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 Unit setOutputAmount(Double outputAmount)

        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 Unit 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

      • 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