Immersive Integration

Immersive Integration

9M Downloads

Industrial Coke Oven shows negative fluid values

angelnc1989 opened this issue · 6 comments

commented

When the Industrial Coke Ovens internal fluid tank is full it somehow shows negative values in the GUI, WAILA however shows the correct 64000/64000mb.
http://imgur.com/a/0r82c

commented

That's... interesting
I'll try to reproduce

commented

I'm seeing this as well, and I think it may cause the ICO to keep processing input even though it isn't making any more liquid. Maybe that's intentional, but normal Coke Ovens halt if their tanks fill. I'll see if I can confirm the behavior and document it a bit.

commented

It is intended that it will keep processing even if the liquid cannot fit

commented

I've noticed this as well, however I'm seeing it when using a TC drain to remove creosote. The tank goes negative and it just keeps pouring, effectively giving infinite creosote. This is using FTB Infinity 2.2.2.

commented

Also had the same issue today with Immersive integration 0.6.6, FTB infinity 2.3.3

Just got it to roll over again while watching. I think it's an integer issue for the value you're storing in the creosote tank.

It appeared that the roll over happened around as I crossed over 32,000 creosote in the tank. You are probably using a signed, 16 bit integer which tops out at 32,767. Once you cross that value, you're rolling over to the negative.

You just need a check to prevent overflowing your integer, both signed or unsigned. Seems to be just a GUI error, as putting bottles in outputs what you would expect.

Series of shots showing:

Early Run:
2016-02-28_12 05 02

Near 32,767
2016-02-28_12 05 42

Just passed over 32,767
2016-02-28_12 06 24

commented

TIL sendProgressBarUpdate sends a short in the packet instead of the int it takes 😳