Class HeatFrameCoolingRecipeImpl

All Implemented Interfaces:
net.minecraft.world.item.crafting.Recipe<PneumaticCraftRecipe.DummyIInventory>

public class HeatFrameCoolingRecipeImpl extends HeatFrameCoolingRecipe
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
     

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

    PneumaticCraftRecipe.DummyIInventory
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    final net.minecraft.world.item.crafting.Ingredient
     
    final net.minecraft.world.item.ItemStack
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    HeatFrameCoolingRecipeImpl(net.minecraft.resources.ResourceLocation id, net.minecraft.world.item.crafting.Ingredient input, int temperature, net.minecraft.world.item.ItemStack output)
     
    HeatFrameCoolingRecipeImpl(net.minecraft.resources.ResourceLocation id, net.minecraft.world.item.crafting.Ingredient input, int temperature, net.minecraft.world.item.ItemStack output, float bonusMultiplier, float bonusLimit)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static <T extends net.minecraft.world.item.crafting.Recipe<?>>
    void
     
    float
    Get the bonus limit; a hard ceiling on the bonus output chance.
    float
    Get the bonus output multiplier; for every degree below the threshold temperature, this raises the chance of a bonus output by this amount.
    net.minecraft.world.item.crafting.Ingredient
    Get the input ingredient.
    static int
    getMaxThresholdTemp(net.minecraft.world.level.Level world)
     
    net.minecraft.world.item.ItemStack
    Get the output item.
    net.minecraft.world.item.crafting.RecipeSerializer<?>
     
    int
    Get the threshold temperature (Kelvin) below which cooling occurs.
    net.minecraft.world.item.crafting.RecipeType<?>
     
    boolean
    matches(net.minecraft.world.item.ItemStack stack)
    Check if the given itemstack is valid for this recipe.
    void
    write(net.minecraft.network.FriendlyByteBuf buffer)
    Writes this recipe to a PacketBuffer.

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

    calculateOutputQuantity

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

    assemble, canCraftInDimensions, getId, getResultItem, isSpecial, matches

    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, getToastSymbol, isIncomplete, showNotification
  • Field Details

    • input

      public final net.minecraft.world.item.crafting.Ingredient input
    • output

      public final net.minecraft.world.item.ItemStack output
  • Constructor Details

    • HeatFrameCoolingRecipeImpl

      public HeatFrameCoolingRecipeImpl(net.minecraft.resources.ResourceLocation id, net.minecraft.world.item.crafting.Ingredient input, int temperature, net.minecraft.world.item.ItemStack output)
    • HeatFrameCoolingRecipeImpl

      public HeatFrameCoolingRecipeImpl(net.minecraft.resources.ResourceLocation id, net.minecraft.world.item.crafting.Ingredient input, int temperature, net.minecraft.world.item.ItemStack output, float bonusMultiplier, float bonusLimit)
  • Method Details

    • getInput

      public net.minecraft.world.item.crafting.Ingredient getInput()
      Description copied from class: HeatFrameCoolingRecipe
      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.
      Specified by:
      getInput in class HeatFrameCoolingRecipe
      Returns:
      the input ingredient
    • getOutput

      public net.minecraft.world.item.ItemStack getOutput()
      Description copied from class: HeatFrameCoolingRecipe
      Get the output item. This does not take into account any bonus multiplier.
      Specified by:
      getOutput in class HeatFrameCoolingRecipe
      Returns:
      the output item
    • getThresholdTemperature

      public int getThresholdTemperature()
      Description copied from class: HeatFrameCoolingRecipe
      Get the threshold temperature (Kelvin) below which cooling occurs.
      Specified by:
      getThresholdTemperature in class HeatFrameCoolingRecipe
      Returns:
      the threshold temperature
    • getBonusMultiplier

      public float getBonusMultiplier()
      Description copied from class: HeatFrameCoolingRecipe
      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.

      Specified by:
      getBonusMultiplier in class HeatFrameCoolingRecipe
      Returns:
      a bonus multiplier
    • getBonusLimit

      public float getBonusLimit()
      Description copied from class: HeatFrameCoolingRecipe
      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.
      Specified by:
      getBonusLimit in class HeatFrameCoolingRecipe
      Returns:
      a bonus limit
    • matches

      public boolean matches(net.minecraft.world.item.ItemStack stack)
      Description copied from class: HeatFrameCoolingRecipe
      Check if the given itemstack is valid for this recipe.
      Specified by:
      matches in class HeatFrameCoolingRecipe
      Parameters:
      stack - the itemstack
      Returns:
      true if this itemstack is valid for this recipe
    • write

      public void write(net.minecraft.network.FriendlyByteBuf buffer)
      Description copied from class: PneumaticCraftRecipe
      Writes this recipe to a PacketBuffer.
      Specified by:
      write in class PneumaticCraftRecipe
      Parameters:
      buffer - The buffer to write to.
    • getSerializer

      public net.minecraft.world.item.crafting.RecipeSerializer<?> getSerializer()
    • getType

      public net.minecraft.world.item.crafting.RecipeType<?> getType()
    • cacheMaxThresholdTemp

      public static <T extends net.minecraft.world.item.crafting.Recipe<?>> void cacheMaxThresholdTemp(Collection<T> recipes)
    • getMaxThresholdTemp

      public static int getMaxThresholdTemp(net.minecraft.world.level.Level world)