public interface IHeatExchangerAdapter extends IHeatExchangerLogic
IHeatExchangerLogic intended for implementing adapter objects for other mods' heat
systems. An implementation of this can be attached to other mods' tile entities to make them appear like PNC heat
exchanging blocks, while internally adapting the PNC heat API to the block's actual heat API.| Modifier and Type | Interface and Description |
|---|---|
static class |
IHeatExchangerAdapter.Simple<CAP>
Convenience adapter implementation which can be extended.
|
ALL_BLOCKS| Modifier and Type | Method and Description |
|---|---|
default int |
getTemperatureAsInt()
Get the heat exchanger's current temperature to the nearest integer.
|
default void |
initializeAmbientTemperature(net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos)
Initialize this heat exchanger's ambient temperature based on the given world & position.
|
default void |
initializeAsHull(net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos,
java.util.function.BiPredicate<net.minecraft.world.IWorld,net.minecraft.util.math.BlockPos> blockFilter,
net.minecraft.util.Direction... validSides)
When called (on tile entity first tick and on neighbor block updates), this discovers all heat
exchanging neighbor tile entities as connected heat exchangers (i.e.
|
default void |
setTemperature(double temperature)
Set the temperature of this heat exchanger.
|
default void |
setThermalCapacity(double capacity)
Set this heat exchanger's thermal capacity.
|
default void |
setThermalResistance(double thermalResistance)
The higher the thermal resistance, the slower the heat disperses.
|
default void |
tick()
Call this to tick this logic, and make the heat disperse itself.
|
addConnectedExchanger, addConnectedExchanger, addHeat, deserializeNBT, getAmbientTemperature, getHeatBehaviour, getTemperature, getThermalCapacity, getThermalResistance, isSideConnected, removeConnectedExchanger, removeConnectedExchanger, serializeNBTdefault void tick()
IHeatExchangerLogictick() method, on the server side only.tick in interface IHeatExchangerLogicdefault void initializeAsHull(net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos,
java.util.function.BiPredicate<net.minecraft.world.IWorld,net.minecraft.util.math.BlockPos> blockFilter,
net.minecraft.util.Direction... validSides)
IHeatExchangerLogicIHeatExchangerLogic capability on that side). It will also account for neighbouring blocks with
special heat properties, like Magma or Lava, and other special cases like Heat Frames (which are entities).
You don't need to call this method if this heat exchanger is not connected to the outside world (e.g. the connecting heat exchanger within a Vortex Tube).
initializeAsHull in interface IHeatExchangerLogicworld - the worldpos - the positionblockFilter - a whitelist check; can be used to exclude certain blocks, e.g. air or fluidsvalidSides - an array of sides to check for heat exchanging neighboursdefault void initializeAmbientTemperature(net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos)
IHeatExchangerLogicIHeatExchangerLogic object via
capability lookup), as hulls are automatically initialized by
IHeatExchangerLogic.initializeAsHull(World, BlockPos, BiPredicate, Direction...)initializeAmbientTemperature in interface IHeatExchangerLogicworld - the worldpos - the positiondefault void setTemperature(double temperature)
IHeatExchangerLogicsetTemperature in interface IHeatExchangerLogictemperature - in degrees Kelvindefault int getTemperatureAsInt()
IHeatExchangerLogicgetTemperatureAsInt in interface IHeatExchangerLogicdefault void setThermalResistance(double thermalResistance)
IHeatExchangerLogicsetThermalResistance in interface IHeatExchangerLogicthermalResistance - the thermal resistance; higher resistance means slower heat transferdefault void setThermalCapacity(double capacity)
IHeatExchangerLogicThe higher the capacity, the more heat can be 'stored'. E.g. an object with a heat capacity of double the heat capacity of another object will require twice as much heat gain or loss to adjust the temperature by the same amount.
setThermalCapacity in interface IHeatExchangerLogiccapacity - the thermal capacity