From 2a6480c35dc3c4721588cec0ca56812172c6b3dc Mon Sep 17 00:00:00 2001 From: TehTemmie <36060353+TehTemmie@users.noreply.github.com> Date: Tue, 7 Dec 2021 20:16:25 +0800 Subject: [PATCH] Fixed rounding errors with large reactor Large reactor rods only affected heat produced (which in turn affects steam production) in increments of 10% (for example, 19% control rod level produced the same heat as 10%) while still consuming more fuel. This change (hopefully) fixes that error, assuming it wasn't intentional. (Yes, I suck at pull requests) --- .../hbm/tileentity/machine/TileEntityMachineReactorLarge.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineReactorLarge.java b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineReactorLarge.java index 65f32d0fc..63fb2cb94 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineReactorLarge.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineReactorLarge.java @@ -374,7 +374,7 @@ public class TileEntityMachineReactorLarge extends TileEntity private void generate() { - int consumption = (maxFuel / cycleDuration) * rods / 100; + int consumption = (int) (((double)maxFuel / cycleDuration) * rods / 100); if(consumption > fuel) consumption = fuel; @@ -385,7 +385,7 @@ public class TileEntityMachineReactorLarge extends TileEntity fuel -= consumption; waste += consumption; - int heat = (consumption / size) * type.heat / fuelMult; + int heat = (int) (((double)consumption / size) * type.heat / fuelMult); this.coreHeat += heat;