Skip to content

Commit b92c90a

Browse files
authored
Fix #960: Large steam boilers remaining 1 degree below their max (#1076)
1 parent 6750e64 commit b92c90a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/java/aztech/modern_industrialization/machines/components/FuelBurningComponent.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,8 @@ public void tick(List<ConfigurableItemStack> itemInputs, List<ConfigurableFluidS
100100
// Turn buffer into heat
101101
long maxEuInsertion = Math.min(burningEuBuffer, maxEuProduction);
102102

103-
maxEuInsertion = Math.min(maxEuInsertion, (long) Math.floor(euPerDegree * (temperature.temperatureMax - temperature.getTemperature())));
103+
// Use ceil here to be able to reach the max temperature exactly, even if it wastes a fraction of an EU.
104+
maxEuInsertion = Math.min(maxEuInsertion, (long) Math.ceil(euPerDegree * (temperature.temperatureMax - temperature.getTemperature())));
104105
if (maxEuInsertion > 0) {
105106
burningEuBuffer -= maxEuInsertion;
106107
temperature.increaseTemperature((double) maxEuInsertion / euPerDegree);

0 commit comments

Comments
 (0)