Refined Storage

Refined Storage

77M Downloads

int overflow when using external storage controller with quantum tank

JheregJAB opened this issue ยท 0 comments

commented

Issue description:

Using the mod QuantumStorage, I took one of their quantum tanks, put water in it, and used their infinite water upgrade. This creates a tank which shows that it has 2,147,483,647 (Integer.MAX_VALUE) buckets of water in it. I then attached a refined storage external storage interface to this tank and set it to fluid mode. I already had one bucket of water in my RS system

What happens:

the number of water buckets in the system overflowed, and showed a negative number of buckets. Crafting recipes requiring water then no longer functioned correctly.

What you expected to happen:

Ideally, the system would be able to display the correct amount of water, so 2,147,483,648. However, due to technical limitations, this isn't likely to be easy. I would suggest just checking if the amount of a fluid in the system will exceed Integer.MAX_VALUE, and set it to just display Integer.MAX_VALUE if it will.

Steps to reproduce:

  1. Create RS System
  2. Add one bucket of water
  3. Create Quantum Storage's Quantum Tank
  4. Add water to Quantum Tank
  5. Add the infinite water upgrade to quantum tank
  6. Attach the Quantum Tank to the RS system
    ...

Version (make sure you are on the latest version before reporting):

  • Minecraft: 1.12.2
  • Forge: 1.12.2-14.23.3.2678-universal
  • Refined Storage: 1.5.33

Does this issue occur on a server? [yes/no] yes

Note: I was using the ATM3 modpack at the time, with version 5.9.5.