Class HeatFrameCoolingRecipe

java.lang.Object
me.desht.pneumaticcraft.api.crafting.recipe.PneumaticCraftRecipe
me.desht.pneumaticcraft.api.crafting.recipe.HeatFrameCoolingRecipe
All Implemented Interfaces:
net.minecraft.world.item.crafting.Recipe<PneumaticCraftRecipe.DummyIInventory>
Direct Known Subclasses:
HeatFrameCoolingRecipeImpl

public abstract class HeatFrameCoolingRecipe extends PneumaticCraftRecipe
  • Nested Class Summary

    Nested classes/interfaces inherited from class me.desht.pneumaticcraft.api.crafting.recipe.PneumaticCraftRecipe

    PneumaticCraftRecipe.DummyIInventory
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    HeatFrameCoolingRecipe(net.minecraft.resources.ResourceLocation id)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    final int
    calculateOutputQuantity(double temperature)
    Calculate an output quantity based on the recipe's bonus settings and the current temperature of the heat frame.
    abstract float
    Get the bonus limit; a hard ceiling on the bonus output chance.
    abstract float
    Get the bonus output multiplier; for every degree below the threshold temperature, this raises the chance of a bonus output by this amount.
    abstract net.minecraft.world.item.crafting.Ingredient
    Get the input ingredient.
    abstract net.minecraft.world.item.ItemStack
    Get the output item.
    abstract int
    Get the threshold temperature (Kelvin) below which cooling occurs.
    abstract boolean
    matches(net.minecraft.world.item.ItemStack stack)
    Check if the given itemstack is valid for this recipe.

    Methods inherited from class me.desht.pneumaticcraft.api.crafting.recipe.PneumaticCraftRecipe

    assemble, canCraftInDimensions, getId, getResultItem, isSpecial, matches, write

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface net.minecraft.world.item.crafting.Recipe

    getGroup, getIngredients, getRemainingItems, getSerializer, getToastSymbol, getType, isIncomplete
  • Constructor Details

    • HeatFrameCoolingRecipe

      protected HeatFrameCoolingRecipe(net.minecraft.resources.ResourceLocation id)
  • Method Details

    • getInput

      public abstract net.minecraft.world.item.crafting.Ingredient getInput()
      Get the input ingredient. Fluid ingredients (FluidIngredient) are acceptable and will be matching by an item containing that fluid, and which provides an IFluidHandlerItem capability.
      Returns:
      the input ingredient
    • getOutput

      public abstract net.minecraft.world.item.ItemStack getOutput()
      Get the output item. This does not take into account any bonus multiplier.
      Returns:
      the output item
    • getThresholdTemperature

      public abstract int getThresholdTemperature()
      Get the threshold temperature (Kelvin) below which cooling occurs.
      Returns:
      the threshold temperature
    • getBonusMultiplier

      public abstract float getBonusMultiplier()
      Get the bonus output multiplier; for every degree below the threshold temperature, this raises the chance of a bonus output by this amount. E.g. with a multiplier of 0.01, there would be a 50% chance of a bonus output when the current temperature is 50 below the threshold temperature.

      Note that the calculated bonus chance could be greater than 1; in that case there is a guaranteed second output plus a chance of a third, and so on.

      Returns:
      a bonus multiplier
    • getBonusLimit

      public abstract float getBonusLimit()
      Get the bonus limit; a hard ceiling on the bonus output chance. E.g. with a limit of 0.8, there will never be a better than 80% chance of a bonus output.
      Returns:
      a bonus limit
    • matches

      public abstract boolean matches(net.minecraft.world.item.ItemStack stack)
      Check if the given itemstack is valid for this recipe.
      Parameters:
      stack - the itemstack
      Returns:
      true if this itemstack is valid for this recipe
    • calculateOutputQuantity

      public final int calculateOutputQuantity(double temperature)
      Calculate an output quantity based on the recipe's bonus settings and the current temperature of the heat frame.
      Parameters:
      temperature - heat frame's current temperature
      Returns:
      the number of output items