public enum HeatExchangerManager extends java.lang.Enum<HeatExchangerManager> implements IHeatRegistry
| Enum Constant and Description |
|---|
INSTANCE |
| Modifier and Type | Method and Description |
|---|---|
static HeatExchangerManager |
getInstance() |
net.minecraftforge.common.util.LazyOptional<IHeatExchangerLogic> |
getLogic(net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos,
net.minecraft.util.Direction side) |
net.minecraftforge.common.util.LazyOptional<IHeatExchangerLogic> |
getLogic(net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos,
net.minecraft.util.Direction side,
java.util.function.BiPredicate<net.minecraft.world.IWorld,net.minecraft.util.math.BlockPos> blockFilter) |
IHeatExchangerLogic |
makeHeatExchangerLogic()
Create a new ticking heat exchanger logic instance for use in tile entities (or potentially other ticking objects).
|
void |
registerBlockExchanger(net.minecraft.block.Block block,
double temperature,
double thermalResistance)
Register a block as a simple heat exchanger (temperature and thermal resistance only; no blockstate transitions).
|
void |
registerHeatBehaviour(net.minecraft.util.ResourceLocation id,
java.util.function.Supplier<? extends HeatBehaviour> heatBehaviour)
Register a heat behaviour instance.
|
static HeatExchangerManager |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static HeatExchangerManager[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final HeatExchangerManager INSTANCE
public static HeatExchangerManager[] values()
for (HeatExchangerManager c : HeatExchangerManager.values()) System.out.println(c);
public static HeatExchangerManager valueOf(java.lang.String name)
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - if the argument is nullpublic static HeatExchangerManager getInstance()
@Nonnull public net.minecraftforge.common.util.LazyOptional<IHeatExchangerLogic> getLogic(net.minecraft.world.World world, net.minecraft.util.math.BlockPos pos, net.minecraft.util.Direction side)
@Nonnull public net.minecraftforge.common.util.LazyOptional<IHeatExchangerLogic> getLogic(net.minecraft.world.World world, net.minecraft.util.math.BlockPos pos, net.minecraft.util.Direction side, java.util.function.BiPredicate<net.minecraft.world.IWorld,net.minecraft.util.math.BlockPos> blockFilter)
public void registerBlockExchanger(net.minecraft.block.Block block,
double temperature,
double thermalResistance)
IHeatRegistryHeatRegistrationEvent or use datapacks.
Note: the preferred way (and only way if you want blockstate transitions) to do this is with datapack recipes. See
data/pneumaticcraft/recipes/block_heat_properties/*.json
registerBlockExchanger in interface IHeatRegistryblock - the blocktemperature - the block's temperaturethermalResistance - the thermal resistance, i.e. how quickly heat will be transferredpublic void registerHeatBehaviour(net.minecraft.util.ResourceLocation id,
java.util.function.Supplier<? extends HeatBehaviour> heatBehaviour)
IHeatRegistryFMLCommonSetupEvent
handler, but be sure to use ParallelDispatchEvent.enqueueWork(Runnable).
This is intended to add custom behaviours to certain tile 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/*.json for examples.
registerHeatBehaviour in interface IHeatRegistryid - a unique for this heat behaviourheatBehaviour - a heat behaviour supplierpublic IHeatExchangerLogic makeHeatExchangerLogic()
IHeatRegistrymakeHeatExchangerLogic in interface IHeatRegistry