Package me.desht.pneumaticcraft.api.heat
Interface IHeatRegistry
- All Known Implementing Classes:
HeatExchangerManager
public interface IHeatRegistry
Get an instance of this via
PneumaticRegistry.IPneumaticCraftInterface.getHeatRegistry().-
Method Summary
Modifier and TypeMethodDescriptionCreate a new ticking heat exchanger logic instance for use in block entities (or potentially other ticking objects) that you create.voidregisterBlockExchanger(net.minecraft.world.level.block.Block block, double temperature, double thermalResistance) Deprecated, for removal: This API element is subject to removal in a future version.removing in 1.19; this should be done by datapackvoidregisterHeatBehaviour(net.minecraft.resources.ResourceLocation id, Supplier<? extends HeatBehaviour> heatBehaviour) Register a heat behaviour instance.
-
Method Details
-
makeHeatExchangerLogic
IHeatExchangerLogic makeHeatExchangerLogic()Create a new ticking heat exchanger logic instance for use in block entities (or potentially other ticking objects) that you create.- Returns:
- a heat exchanger logic
-
registerBlockExchanger
@Deprecated(forRemoval=true) void registerBlockExchanger(net.minecraft.world.level.block.Block block, double temperature, double thermalResistance) Deprecated, for removal: This API element is subject to removal in a future version.removing in 1.19; this should be done by datapackRegister a block as a simple heat exchanger (temperature and thermal resistance only; no blockstate transitions). Don't call this directly; subscribe toHeatRegistrationEventor, preferably, use datapacks.Note: the preferred way (and the only way if you want blockstate transitions) to do this is with datapack recipes. See
data/pneumaticcraft/recipes/block_heat_properties/*.json- Parameters:
block- the blocktemperature- the block's temperaturethermalResistance- the thermal resistance, i.e. how quickly heat will be transferred
-
registerHeatBehaviour
void registerHeatBehaviour(net.minecraft.resources.ResourceLocation id, Supplier<? extends HeatBehaviour> heatBehaviour) Register a heat behaviour instance. This can be called from aFMLCommonSetupEventhandler; do not useParallelDispatchEvent.enqueueWork(Runnable). Alternatively, if you need to override in-built behaviour (e.g. to disable automatic furnace fueling), you can register a handler in aServerAboutToStartEventhandler.This is intended to add custom behaviours to certain block entities, similar to how the vanilla furnace is handled. For general blockstate transitions (on excess heat added/removed), the correct way to do this is with datapack recipes. See
data/pneumaticcraft/recipes/block_heat_properties/*.jsonfor examples.- Parameters:
id- a unique for this heat behaviourheatBehaviour- a heat behaviour supplier
-