Package me.desht.pneumaticcraft.api.heat
Class IHeatExchangerAdapter.Simple<CAP>
java.lang.Object
me.desht.pneumaticcraft.api.heat.IHeatExchangerAdapter.Simple<CAP>
- Type Parameters:
CAP- the interface object for the other mod's heat capability object
- All Implemented Interfaces:
IHeatExchangerAdapter,IHeatExchangerLogic,net.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>
- Direct Known Subclasses:
Mek2PNCHeatProvider.Mek2PNCHeatAdapter
- Enclosing interface:
- IHeatExchangerAdapter
public abstract static class IHeatExchangerAdapter.Simple<CAP>
extends Object
implements IHeatExchangerAdapter
Convenience adapter implementation which can be extended. Handles sidedness and ambient temperature
automatically, as well as storing the other mod's heat capability object for adapting purposes.
-
Nested Class Summary
Nested classes/interfaces inherited from interface me.desht.pneumaticcraft.api.heat.IHeatExchangerAdapter
IHeatExchangerAdapter.Simple<CAP> -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final doubleprotected final net.minecraftforge.common.util.LazyOptional<CAP>protected final net.minecraft.core.DirectionFields inherited from interface me.desht.pneumaticcraft.api.heat.IHeatExchangerLogic
ALL_BLOCKS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoubleGet the heat exchanger's ambient temperature, i.e.booleanisSideConnected(net.minecraft.core.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.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface me.desht.pneumaticcraft.api.heat.IHeatExchangerAdapter
getTemperatureAsInt, initializeAmbientTemperature, initializeAsHull, setTemperature, setThermalCapacity, setThermalResistance, tickMethods inherited from interface me.desht.pneumaticcraft.api.heat.IHeatExchangerLogic
addConnectedExchanger, addConnectedExchanger, addHeat, deserializeNBT, getHeatBehaviour, getTemperature, getThermalCapacity, getThermalResistance, removeConnectedExchanger, removeConnectedExchanger, serializeNBT
-
Field Details
-
side
protected final net.minecraft.core.Direction side -
foreignHeatCap
-
ambientTemperature
protected final double ambientTemperature
-
-
Constructor Details
-
Simple
public Simple(net.minecraft.core.Direction side, net.minecraftforge.common.util.LazyOptional<CAP> foreignHeatCap, double ambientTemperature)
-
-
Method Details
-
getAmbientTemperature
public double getAmbientTemperature()Description copied from interface:IHeatExchangerLogicGet the heat exchanger's ambient temperature, i.e. the temperature at which it initially starts, dependent on its environment (biome and altitude).- Specified by:
getAmbientTemperaturein interfaceIHeatExchangerLogic- Returns:
- the ambient temperature
-
isSideConnected
public boolean isSideConnected(net.minecraft.core.Direction side) Description copied from interface:IHeatExchangerLogicCheck 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. The connection data is initialized inIHeatExchangerLogic.initializeAsHull(Level, BlockPos, BiPredicate, Direction...).- Specified by:
isSideConnectedin interfaceIHeatExchangerLogic- Parameters:
side- the side to check- Returns:
- true if this side has a thermal connection of any kind
-