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.
  • Field Details

    • side

      protected final net.minecraft.core.Direction side
    • foreignHeatCap

      protected final net.minecraftforge.common.util.LazyOptional<CAP> 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: IHeatExchangerLogic
      Get the heat exchanger's ambient temperature, i.e. the temperature at which it initially starts, dependent on its environment (biome and altitude).
      Specified by:
      getAmbientTemperature in interface IHeatExchangerLogic
      Returns:
      the ambient temperature
    • isSideConnected

      public boolean isSideConnected(net.minecraft.core.Direction side)
      Description copied from interface: IHeatExchangerLogic
      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. The connection data is initialized in IHeatExchangerLogic.initializeAsHull(Level, BlockPos, BiPredicate, Direction...).
      Specified by:
      isSideConnected in interface IHeatExchangerLogic
      Parameters:
      side - the side to check
      Returns:
      true if this side has a thermal connection of any kind