Class HeatPropertiesRecipe

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

public abstract class HeatPropertiesRecipe extends PneumaticCraftRecipe
Recipes which define the heat properties of a block; its temperature, thermal resistance, heat capacity, and the blocks it can turn into when too much heat is added or removed via the PneumaticCraft heat system.
  • Constructor Details

    • HeatPropertiesRecipe

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

    • getBlock

      public abstract net.minecraft.world.level.block.Block getBlock()
      Get the block, which is effectively the input for this recipe
      Returns:
      the block
    • getBlockState

      public abstract net.minecraft.world.level.block.state.BlockState getBlockState()
      Get the blockstate for this entry. This is not necessarily the block's default state (e.g. a vanilla campfire only has heat when it's lit, which is a boolean blockstate property)
      Returns:
      the blockstate
    • getHeatCapacity

      public abstract int getHeatCapacity()
      Get the heat capacity for this block. This is the amount of heat which can be gained or lost before it transforms into some other block.
      Returns:
      the heat capacity, or 0 if this never transforms
    • getTemperature

      public abstract int getTemperature()
      The block's temperature. For fluid blocks, this will be temperature of the fluid, which is defined by the mod which registered that fluid (or 1300K for lava and 300K for water)
      Returns:
      the block's temperature
    • getThermalResistance

      public abstract double getThermalResistance()
      The block's thermal resistance, which defines how quickly heat is added or lost. Higher resistances mean a slower transfer of heat in or out of the block
      Returns:
      the thermal resistance
    • getTransformHot

      public abstract net.minecraft.world.level.block.state.BlockState getTransformHot()
      Get the blockstate which the input will transform to if too much heat is added to it. This may be null if there is no hot transformation.
      Returns:
      a new blockstate
    • getTransformCold

      public abstract net.minecraft.world.level.block.state.BlockState getTransformCold()
      Get the blockstate which the input will transform to if too much heat is removed from it. This may be null if there is no cold transformation.
      Returns:
      a new blockstate
    • getTransformHotFlowing

      public abstract net.minecraft.world.level.block.state.BlockState getTransformHotFlowing()
      Same as getTransformHot() but for flowing variants of the input block, when it is a fluid.
      Returns:
      a new blockstate
    • getTransformColdFlowing

      public abstract net.minecraft.world.level.block.state.BlockState getTransformColdFlowing()
      Same as getTransformCold() but for flowing variants of the input block, when it is a fluid.
      Returns:
      a new blockstate
    • getLogic

      public abstract IHeatExchangerLogic getLogic()
      Get a heat exchanger logic object for this recipe. This is mainly a convenience to get the associated temperature and thermal resistance.
      Returns:
      a heat exchanger logic
    • matchState

      public abstract boolean matchState(net.minecraft.world.level.block.state.BlockState state)
      Check if this recipe's input matches the supplied blockstate. See also getBlockStatePredicates().
      Parameters:
      state - the blockstate to test against
      Returns:
      true if this recipe matches the supplied blockstate, false otherwise
    • getBlockStatePredicates

      public abstract Map<String,String> getBlockStatePredicates()
      Get the blockstate predicates for this recipe. All of these predicates must match for matchState(BlockState) to succeed. E.g. for a lit campfire, this map would be { "lit" = "true" }
      Returns:
      a map of blockstate properties to their required values
    • getDescriptionKey

      public abstract String getDescriptionKey()
      Get a translation key for a player-friendly description of this recipe. This could be empty; if not empty, then it should be used by recipe display systems like JEI as a supplementary description for this recipe, appending to the result of getInputDisplayName().
      Returns:
      a translation key, or the empty string for no supplementary text
    • getInputDisplayName

      public net.minecraft.network.chat.Component getInputDisplayName()
      Get a player-friendly display name for the input block, for use in recipe display systems like JEI.
      Returns:
      some displayable text