Enum Class HeatExchangerManager
- All Implemented Interfaces:
Serializable,Comparable<HeatExchangerManager>,Constable,IHeatRegistry
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic HeatExchangerManagernet.minecraftforge.common.util.LazyOptional<IHeatExchangerLogic>getLogic(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, net.minecraft.core.Direction side) net.minecraftforge.common.util.LazyOptional<IHeatExchangerLogic>getLogic(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, net.minecraft.core.Direction side, BiPredicate<net.minecraft.world.level.LevelAccessor, net.minecraft.core.BlockPos> blockFilter) Create 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) Register a block as a simple heat exchanger (temperature and thermal resistance only; no blockstate transitions).voidregisterHeatBehaviour(net.minecraft.resources.ResourceLocation id, Supplier<? extends HeatBehaviour> heatBehaviour) Register a heat behaviour instance.static HeatExchangerManagerReturns the enum constant of this class with the specified name.static HeatExchangerManager[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
INSTANCE
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
getInstance
-
getLogic
@Nonnull public net.minecraftforge.common.util.LazyOptional<IHeatExchangerLogic> getLogic(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, net.minecraft.core.Direction side) -
getLogic
@Nonnull public net.minecraftforge.common.util.LazyOptional<IHeatExchangerLogic> getLogic(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, net.minecraft.core.Direction side, BiPredicate<net.minecraft.world.level.LevelAccessor, net.minecraft.core.BlockPos> blockFilter) -
registerBlockExchanger
public void registerBlockExchanger(net.minecraft.world.level.block.Block block, double temperature, double thermalResistance) Description copied from interface:IHeatRegistryRegister 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- Specified by:
registerBlockExchangerin interfaceIHeatRegistry- Parameters:
block- the blocktemperature- the block's temperaturethermalResistance- the thermal resistance, i.e. how quickly heat will be transferred
-
registerHeatBehaviour
public void registerHeatBehaviour(net.minecraft.resources.ResourceLocation id, Supplier<? extends HeatBehaviour> heatBehaviour) Description copied from interface:IHeatRegistryRegister 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.- Specified by:
registerHeatBehaviourin interfaceIHeatRegistry- Parameters:
id- a unique for this heat behaviourheatBehaviour- a heat behaviour supplier
-
makeHeatExchangerLogic
Description copied from interface:IHeatRegistryCreate a new ticking heat exchanger logic instance for use in block entities (or potentially other ticking objects) that you create.- Specified by:
makeHeatExchangerLogicin interfaceIHeatRegistry- Returns:
- a heat exchanger logic
-