GregTechCEu Modern

GregTechCEu Modern

6M Downloads

Large Tungsten Boiler steam production int overflow

Miner239 opened this issue ยท 0 comments

commented

Checked for existing issues

  • I have checked for existing issues, and have found none.

Tested latest version

  • I have checked that this occurs on the latest version.

GregTech CEu Version

GTM 1.5.3

Minecraft Version

1.20.1

Recipe Viewer Installed

EMI

Environment

Singleplayer

Cross-Mod Interaction

No

Other Installed Mods

Monifactory

Expected Behavior

On full temperature and throttle, Large Tungstensteel Boiler produces 6400mB/t steam

Actual Behavior

Boiler displays negative production rate once it reaches over 4294mB/t, no steam made and no water drained when production rate is negative

Steps to Reproduce

  1. Build tungstensteel boiler
  2. Run boiler to temp
  3. Watch as steam production flips to negative once it reaches over 4294mB/t

Additional Information

Caused by overflow in calculation in this line: https://github.com/GregTechCEu/GregTech-Modern/blob/1.20.1/src/main/java/com/gregtechceu/gtceu/common/machine/multiblock/steam/LargeBoilerMachine.java#L120

6400 * 100 * 5 * 1000 = 3 200 000 000 > 2 147 483 647