Class HeatPropertiesRecipeImpl

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

public class HeatPropertiesRecipeImpl extends HeatPropertiesRecipe
  • Constructor Details

    • HeatPropertiesRecipeImpl

      public HeatPropertiesRecipeImpl(net.minecraft.resources.ResourceLocation id, net.minecraft.world.level.block.Block block, net.minecraft.world.level.block.state.BlockState transformHot, net.minecraft.world.level.block.state.BlockState transformHotFlowing, net.minecraft.world.level.block.state.BlockState transformCold, net.minecraft.world.level.block.state.BlockState transformColdFlowing, int heatCapacity, int temperature, double thermalResistance, Map<String,String> predicates, String descriptionKey)
    • HeatPropertiesRecipeImpl

      public HeatPropertiesRecipeImpl(net.minecraft.resources.ResourceLocation id, net.minecraft.world.level.block.Block block, int temperature, double thermalResistance)
  • Method Details

    • getHeatCapacity

      public int getHeatCapacity()
      Description copied from class: HeatPropertiesRecipe
      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.
      Specified by:
      getHeatCapacity in class HeatPropertiesRecipe
      Returns:
      the heat capacity, or 0 if this never transforms
    • getTemperature

      public int getTemperature()
      Description copied from class: HeatPropertiesRecipe
      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)
      Specified by:
      getTemperature in class HeatPropertiesRecipe
      Returns:
      the block's temperature
    • getThermalResistance

      public double getThermalResistance()
      Description copied from class: HeatPropertiesRecipe
      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
      Specified by:
      getThermalResistance in class HeatPropertiesRecipe
      Returns:
      the thermal resistance
    • getBlock

      public net.minecraft.world.level.block.Block getBlock()
      Description copied from class: HeatPropertiesRecipe
      Get the block, which is effectively the input for this recipe
      Specified by:
      getBlock in class HeatPropertiesRecipe
      Returns:
      the block
    • getBlockState

      public net.minecraft.world.level.block.state.BlockState getBlockState()
      Description copied from class: HeatPropertiesRecipe
      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)
      Specified by:
      getBlockState in class HeatPropertiesRecipe
      Returns:
      the blockstate
    • getTransformHot

      public net.minecraft.world.level.block.state.BlockState getTransformHot()
      Description copied from class: HeatPropertiesRecipe
      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.
      Specified by:
      getTransformHot in class HeatPropertiesRecipe
      Returns:
      a new blockstate
    • getTransformCold

      public net.minecraft.world.level.block.state.BlockState getTransformCold()
      Description copied from class: HeatPropertiesRecipe
      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.
      Specified by:
      getTransformCold in class HeatPropertiesRecipe
      Returns:
      a new blockstate
    • getTransformHotFlowing

      public net.minecraft.world.level.block.state.BlockState getTransformHotFlowing()
      Description copied from class: HeatPropertiesRecipe
      Same as HeatPropertiesRecipe.getTransformHot() but for flowing variants of the input block, when it is a fluid.
      Specified by:
      getTransformHotFlowing in class HeatPropertiesRecipe
      Returns:
      a new blockstate
    • getTransformColdFlowing

      public net.minecraft.world.level.block.state.BlockState getTransformColdFlowing()
      Description copied from class: HeatPropertiesRecipe
      Same as HeatPropertiesRecipe.getTransformCold() but for flowing variants of the input block, when it is a fluid.
      Specified by:
      getTransformColdFlowing in class HeatPropertiesRecipe
      Returns:
      a new blockstate
    • getLogic

      public IHeatExchangerLogic getLogic()
      Description copied from class: HeatPropertiesRecipe
      Get a heat exchanger logic object for this recipe. This is mainly a convenience to get the associated temperature and thermal resistance.
      Specified by:
      getLogic in class HeatPropertiesRecipe
      Returns:
      a heat exchanger logic
    • 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()
    • matchState

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

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

      public String getDescriptionKey()
      Description copied from class: HeatPropertiesRecipe
      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 HeatPropertiesRecipe.getInputDisplayName().
      Specified by:
      getDescriptionKey in class HeatPropertiesRecipe
      Returns:
      a translation key, or the empty string for no supplementary text