public class HeatExchangerLogicTicking extends java.lang.Object implements IHeatExchangerLogic
ALL_BLOCKS| Constructor and Description |
|---|
HeatExchangerLogicTicking() |
| Modifier and Type | Method and Description |
|---|---|
void |
addConnectedExchanger(IHeatExchangerLogic exchanger,
boolean reciprocate) |
void |
addHeat(double amount)
Adds heat (= deltaT * Thermal Capacity) to this exchanger.
|
void |
deserializeNBT(net.minecraft.nbt.CompoundNBT nbt) |
static void |
exchange(IHeatExchangerLogic logic,
IHeatExchangerLogic logic2) |
double |
getAmbientTemperature()
Get the heat exchanger's ambient temperature, i.e.
|
<T extends HeatBehaviour<?>> |
getHeatBehaviour(net.minecraft.util.math.BlockPos pos,
java.lang.Class<T> cls)
Get the
HeatBehaviour at the given position, which must be adjacent to this heat exchanger's owning tile
entity, and in this heat exchanger's list of heat behaviours that it handles. |
double |
getTemperature()
Get the heat exchanger's current (precise) temperature.
|
int |
getTemperatureAsInt()
Get the heat exchanger's current temperature to the nearest integer.
|
double |
getThermalCapacity()
Get this heat exchanger's thermal capacity.
|
double |
getThermalResistance()
Get this heat exchanger's thermal resistance.
|
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.
|
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.
|
boolean |
isSideConnected(net.minecraft.util.Direction side)
Check if this side of the heat exchanger has a thermal connection of any kind to the neighbouring block in the
given direction; whether to another heat exchanger, a static heat source like air, or a custom handler such as
a furnace or heat frame.
|
void |
removeConnectedExchanger(IHeatExchangerLogic exchanger,
boolean reciprocate) |
net.minecraft.nbt.CompoundNBT |
serializeNBT() |
void |
setTemperature(double temperature)
Set the temperature of this heat exchanger.
|
void |
setThermalCapacity(double capacity)
Set this heat exchanger's thermal capacity.
|
void |
setThermalResistance(double thermalResistance)
The higher the thermal resistance, the slower the heat disperses.
|
void |
tick()
Call this to tick this logic, and make the heat disperse itself.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddConnectedExchanger, removeConnectedExchangerpublic 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 neighbourspublic boolean isSideConnected(net.minecraft.util.Direction side)
IHeatExchangerLogicIHeatExchangerLogic.initializeAsHull(World, BlockPos, BiPredicate, Direction...).isSideConnected in interface IHeatExchangerLogicside - the side to checkpublic void addConnectedExchanger(IHeatExchangerLogic exchanger, boolean reciprocate)
addConnectedExchanger in interface IHeatExchangerLogicexchanger - the other heat exchangerreciprocate - whether the other exchanger should also add this onepublic void removeConnectedExchanger(IHeatExchangerLogic exchanger, boolean reciprocate)
removeConnectedExchanger in interface IHeatExchangerLogicexchanger - the other heat exchangerreciprocate - whether the other exchanger should also add this onepublic 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 positionpublic double getTemperature()
IHeatExchangerLogicIHeatExchangerLogic.getTemperatureAsInt() there instead.getTemperature in interface IHeatExchangerLogicpublic int getTemperatureAsInt()
IHeatExchangerLogicgetTemperatureAsInt in interface IHeatExchangerLogicpublic void setTemperature(double temperature)
IHeatExchangerLogicsetTemperature in interface IHeatExchangerLogictemperature - in degrees Kelvinpublic void setThermalResistance(double thermalResistance)
IHeatExchangerLogicsetThermalResistance in interface IHeatExchangerLogicthermalResistance - the thermal resistance; higher resistance means slower heat transferpublic double getThermalResistance()
IHeatExchangerLogicIHeatExchangerLogic.setThermalResistance(double) for more information
on thermal resistance.getThermalResistance in interface IHeatExchangerLogicpublic 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 capacitypublic double getThermalCapacity()
IHeatExchangerLogicIHeatExchangerLogic.setThermalCapacity(double) for more information.getThermalCapacity in interface IHeatExchangerLogicpublic net.minecraft.nbt.CompoundNBT serializeNBT()
serializeNBT in interface IHeatExchangerLogicserializeNBT in interface net.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundNBT>public void deserializeNBT(net.minecraft.nbt.CompoundNBT nbt)
deserializeNBT in interface IHeatExchangerLogicdeserializeNBT in interface net.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundNBT>public void tick()
IHeatExchangerLogictick() method, on the server side only.tick in interface IHeatExchangerLogicpublic double getAmbientTemperature()
IHeatExchangerLogicgetAmbientTemperature in interface IHeatExchangerLogicpublic static void exchange(IHeatExchangerLogic logic, IHeatExchangerLogic logic2)
public void addHeat(double amount)
IHeatExchangerLogicaddHeat in interface IHeatExchangerLogicamount - the heat amountpublic <T extends HeatBehaviour<?>> java.util.Optional<T> getHeatBehaviour(net.minecraft.util.math.BlockPos pos, java.lang.Class<T> cls)
IHeatExchangerLogicHeatBehaviour at the given position, which must be adjacent to this heat exchanger's owning tile
entity, and in this heat exchanger's list of heat behaviours that it handles.getHeatBehaviour in interface IHeatExchangerLogicpos - position of the heat behaviourcls - required class of the heat behaviour (any heat behaviour which extends this class will match)Optional.empty() the position is invalid or there is no matching
heat behaviour there