Package me.desht.pneumaticcraft.api.heat
Interface TemperatureListener
- All Known Implementing Classes:
ThermostatModule
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
An implementation of this can be registered with
IHeatExchangerLogic.addTemperatureListener(TemperatureListener)
to monitor changes in the heat exchanger's temperature. Take care to also call
IHeatExchangerLogic.removeTemperatureListener(TemperatureListener) when the object that implements this
goes out of scope, to avoid memory leaks.-
Method Summary
Modifier and TypeMethodDescriptionvoidonTemperatureChanged(double prevTemperature, double newTemperature) Called when the monitored heat exchanger's temperature changes.
-
Method Details
-
onTemperatureChanged
void onTemperatureChanged(double prevTemperature, double newTemperature) Called when the monitored heat exchanger's temperature changes.- Parameters:
prevTemperature- the previous temperaturenewTemperature- the new temperature
-