Class HeatPropertiesRecipeImpl
java.lang.Object
me.desht.pneumaticcraft.api.crafting.recipe.PneumaticCraftRecipe
me.desht.pneumaticcraft.api.crafting.recipe.HeatPropertiesRecipe
me.desht.pneumaticcraft.common.recipes.other.HeatPropertiesRecipeImpl
- All Implemented Interfaces:
net.minecraft.world.item.crafting.Recipe<PneumaticCraftRecipe.DummyIInventory>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classNested classes/interfaces inherited from class me.desht.pneumaticcraft.api.crafting.recipe.PneumaticCraftRecipe
PneumaticCraftRecipe.DummyIInventory -
Constructor Summary
ConstructorsConstructorDescriptionHeatPropertiesRecipeImpl(net.minecraft.resources.ResourceLocation id, net.minecraft.world.level.block.Block block, int temperature, double thermalResistance) 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) -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.world.level.block.BlockgetBlock()Get the block, which is effectively the input for this recipenet.minecraft.world.level.block.state.BlockStateGet the blockstate for this entry.Get the blockstate predicates for this recipe.Get a translation key for a player-friendly description of this recipe.intGet the heat capacity for this block.getLogic()Get a heat exchanger logic object for this recipe.net.minecraft.world.item.crafting.RecipeSerializer<?>intThe block's temperature.doubleThe block's thermal resistance, which defines how quickly heat is added or lost.net.minecraft.world.level.block.state.BlockStateGet the blockstate which the input will transform to if too much heat is removed from it.net.minecraft.world.level.block.state.BlockStateSame asHeatPropertiesRecipe.getTransformCold()but for flowing variants of the input block, when it is a fluid.net.minecraft.world.level.block.state.BlockStateGet the blockstate which the input will transform to if too much heat is added to it.net.minecraft.world.level.block.state.BlockStateSame asHeatPropertiesRecipe.getTransformHot()but for flowing variants of the input block, when it is a fluid.net.minecraft.world.item.crafting.RecipeType<?>getType()booleanmatchState(net.minecraft.world.level.block.state.BlockState state) Check if this recipe's input matches the supplied blockstate.voidwrite(net.minecraft.network.FriendlyByteBuf buffer) Writes this recipe to a PacketBuffer.Methods inherited from class me.desht.pneumaticcraft.api.crafting.recipe.HeatPropertiesRecipe
getInputDisplayNameMethods inherited from class me.desht.pneumaticcraft.api.crafting.recipe.PneumaticCraftRecipe
assemble, canCraftInDimensions, getId, getResultItem, isSpecial, matchesMethods 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, getToastSymbol, isIncomplete, showNotification
-
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:HeatPropertiesRecipeGet 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:
getHeatCapacityin classHeatPropertiesRecipe- Returns:
- the heat capacity, or 0 if this never transforms
-
getTemperature
public int getTemperature()Description copied from class:HeatPropertiesRecipeThe 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:
getTemperaturein classHeatPropertiesRecipe- Returns:
- the block's temperature
-
getThermalResistance
public double getThermalResistance()Description copied from class:HeatPropertiesRecipeThe 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:
getThermalResistancein classHeatPropertiesRecipe- Returns:
- the thermal resistance
-
getBlock
public net.minecraft.world.level.block.Block getBlock()Description copied from class:HeatPropertiesRecipeGet the block, which is effectively the input for this recipe- Specified by:
getBlockin classHeatPropertiesRecipe- Returns:
- the block
-
getBlockState
public net.minecraft.world.level.block.state.BlockState getBlockState()Description copied from class:HeatPropertiesRecipeGet 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:
getBlockStatein classHeatPropertiesRecipe- Returns:
- the blockstate
-
getTransformHot
public net.minecraft.world.level.block.state.BlockState getTransformHot()Description copied from class:HeatPropertiesRecipeGet 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:
getTransformHotin classHeatPropertiesRecipe- Returns:
- a new blockstate
-
getTransformCold
public net.minecraft.world.level.block.state.BlockState getTransformCold()Description copied from class:HeatPropertiesRecipeGet 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:
getTransformColdin classHeatPropertiesRecipe- Returns:
- a new blockstate
-
getTransformHotFlowing
public net.minecraft.world.level.block.state.BlockState getTransformHotFlowing()Description copied from class:HeatPropertiesRecipeSame asHeatPropertiesRecipe.getTransformHot()but for flowing variants of the input block, when it is a fluid.- Specified by:
getTransformHotFlowingin classHeatPropertiesRecipe- Returns:
- a new blockstate
-
getTransformColdFlowing
public net.minecraft.world.level.block.state.BlockState getTransformColdFlowing()Description copied from class:HeatPropertiesRecipeSame asHeatPropertiesRecipe.getTransformCold()but for flowing variants of the input block, when it is a fluid.- Specified by:
getTransformColdFlowingin classHeatPropertiesRecipe- Returns:
- a new blockstate
-
getLogic
Description copied from class:HeatPropertiesRecipeGet a heat exchanger logic object for this recipe. This is mainly a convenience to get the associated temperature and thermal resistance.- Specified by:
getLogicin classHeatPropertiesRecipe- Returns:
- a heat exchanger logic
-
write
public void write(net.minecraft.network.FriendlyByteBuf buffer) Description copied from class:PneumaticCraftRecipeWrites this recipe to a PacketBuffer.- Specified by:
writein classPneumaticCraftRecipe- 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:HeatPropertiesRecipeCheck if this recipe's input matches the supplied blockstate. See alsoHeatPropertiesRecipe.getBlockStatePredicates().- Specified by:
matchStatein classHeatPropertiesRecipe- Parameters:
state- the blockstate to test against- Returns:
- true if this recipe matches the supplied blockstate, false otherwise
-
getBlockStatePredicates
Description copied from class:HeatPropertiesRecipeGet the blockstate predicates for this recipe. All of these predicates must match forHeatPropertiesRecipe.matchState(BlockState)to succeed. E.g. for a lit campfire, this map would be { "lit" = "true" }- Specified by:
getBlockStatePredicatesin classHeatPropertiesRecipe- Returns:
- a map of blockstate properties to their required values
-
getDescriptionKey
Description copied from class:HeatPropertiesRecipeGet 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 ofHeatPropertiesRecipe.getInputDisplayName().- Specified by:
getDescriptionKeyin classHeatPropertiesRecipe- Returns:
- a translation key, or the empty string for no supplementary text
-