TinyModularThings / IC2Classic

IC2Classic Bugtracker
151 stars 39 forks source link

Issue with avaritia neutronium. #423

Closed lfpp003 closed 4 years ago

lfpp003 commented 4 years ago

When in gamemode survival, neutronium makes ic2c crash the game: 7 │ java.lang.ArithmeticException: / by zero 8 │ at ic2.core.IC2Potion.func_76397_a(IC2Potion.java:30)

Speiger commented 4 years ago

Which minecraft version is this? 1.7.10 or 1.12?

Speiger commented 4 years ago

@lfpp003

lfpp003 commented 4 years ago

It is in version 1.7.10. I found that the issue is not the neutronium itself, rather the radioactivity effect, which I think is added to this item by gregtech 6. The radioactivity level is 10, the highest one in gt6, I tested with lower levels, and none of them have this problem. I imagine this might be an issue related to overflowing.

GregoriusT commented 4 years ago

Here is what happened. GT has applied the IC2 Potion Effect of Radiation at amplifier level 5 (that is Radiation 6 btw), somehow the Damage Calculation timer runs as "TIME % (25 >> amplifier) == 0" for whatever dumb reason (old IC2 Code), which if you plug in the number 5 or any number greater than 5 will result in a Zero, said Zero will then cause the % to divide by Zero and crash.

This is mainly a stupidity of ancient IC2 Code, combined with ye olde Greg not frikkin testing his highest Level Radiation Items at all to see if that Bug happens.

To make it short, both me and Speiger have to fix this on both of our ends. Me because IC2Exp sure as heck wont fix its shit, and Speiger because its a good thing to fix crashes, lol.

Speiger commented 4 years ago

Fixed and released