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
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.
-
Nested Class Summary
Nested classes/interfaces inherited from class me.desht.pneumaticcraft.api.crafting.recipe.PneumaticCraftRecipe
PneumaticCraftRecipe.DummyIInventory -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedHeatPropertiesRecipe(net.minecraft.resources.ResourceLocation id) -
Method Summary
Modifier and TypeMethodDescriptionabstract net.minecraft.world.level.block.BlockgetBlock()Get the block, which is effectively the input for this recipeabstract net.minecraft.world.level.block.state.BlockStateGet the blockstate for this entry.Get the blockstate predicates for this recipe.abstract StringGet a translation key for a player-friendly description of this recipe.abstract intGet the heat capacity for this block.net.minecraft.network.chat.ComponentGet a player-friendly display name for the input block, for use in recipe display systems like JEI.abstract IHeatExchangerLogicgetLogic()Get a heat exchanger logic object for this recipe.abstract intThe block's temperature.abstract doubleThe block's thermal resistance, which defines how quickly heat is added or lost.abstract net.minecraft.world.level.block.state.BlockStateGet the blockstate which the input will transform to if too much heat is removed from it.abstract net.minecraft.world.level.block.state.BlockStateSame asgetTransformCold()but for flowing variants of the input block, when it is a fluid.abstract net.minecraft.world.level.block.state.BlockStateGet the blockstate which the input will transform to if too much heat is added to it.abstract net.minecraft.world.level.block.state.BlockStateSame asgetTransformHot()but for flowing variants of the input block, when it is a fluid.abstract booleanmatchState(net.minecraft.world.level.block.state.BlockState state) Check if this recipe's input matches the supplied blockstate.Methods inherited from class me.desht.pneumaticcraft.api.crafting.recipe.PneumaticCraftRecipe
assemble, canCraftInDimensions, getId, getResultItem, isSpecial, matches, writeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.world.item.crafting.Recipe
getGroup, getIngredients, getRemainingItems, getSerializer, getToastSymbol, getType, isIncomplete, showNotification
-
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 asgetTransformHot()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 asgetTransformCold()but for flowing variants of the input block, when it is a fluid.- Returns:
- a new blockstate
-
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 alsogetBlockStatePredicates().- Parameters:
state- the blockstate to test against- Returns:
- true if this recipe matches the supplied blockstate, false otherwise
-
getBlockStatePredicates
Get the blockstate predicates for this recipe. All of these predicates must match formatchState(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
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 ofgetInputDisplayName().- 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
-