public class HeatExchangerLogicConstant extends java.lang.Object implements IHeatExchangerLogic
ALL_BLOCKS| Constructor and Description |
|---|
HeatExchangerLogicConstant(double temperature,
double thermalResistance) |
| Modifier and Type | Method and Description |
|---|---|
void |
addHeat(double amount)
Adds heat (= deltaT * Thermal Capacity) to this exchanger.
|
double |
getAmbientTemperature()
Get the heat exchanger's ambient temperature, i.e.
|
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> loseHeatToAir,
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 |
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, addConnectedExchanger, deserializeNBT, getHeatBehaviour, removeConnectedExchanger, removeConnectedExchanger, serializeNBTpublic HeatExchangerLogicConstant(double temperature,
double thermalResistance)
public void tick()
IHeatExchangerLogictick() method, on the server side only.tick in interface IHeatExchangerLogicpublic 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> loseHeatToAir,
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 positionloseHeatToAir - 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 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 void setTemperature(double temperature)
IHeatExchangerLogicsetTemperature in interface IHeatExchangerLogictemperature - in degrees Kelvinpublic double getAmbientTemperature()
IHeatExchangerLogicgetAmbientTemperature in interface IHeatExchangerLogicpublic double getTemperature()
IHeatExchangerLogicIHeatExchangerLogic.getTemperatureAsInt() there instead.getTemperature in interface IHeatExchangerLogicpublic int getTemperatureAsInt()
IHeatExchangerLogicgetTemperatureAsInt in interface IHeatExchangerLogicpublic 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 void addHeat(double amount)
IHeatExchangerLogicaddHeat in interface IHeatExchangerLogicamount - the heat amountpublic boolean isSideConnected(net.minecraft.util.Direction side)
IHeatExchangerLogicIHeatExchangerLogic.initializeAsHull(World, BlockPos, BiPredicate, Direction...).isSideConnected in interface IHeatExchangerLogicside - the side to check