Blood Magic

Blood Magic

97M Downloads

Crash on comparator placement.

JavAstrologic opened this issue ยท 1 comments

commented

The game crashes when a comparator is placed next to an altar when a bloodstone block is underneath it. The problem has been speculated to be this line:

"return NetworkHelper.getSoulNetwork(binding).getCurrentEssence() * 15 / orb.getCapacity();"

Being that it may be possible that "orb.getCapacity()" is returning 0, and thus, the return is dividing by zero.

Something like this should be implemented instead:

float capacity = orb.getCapacity();
if (capacity <= 0) {
return 0;
}
return NetworkHelper.getSoulNetwork(binding).getCurrentEssence() * 15 / capacity;

I will note that the crash happens before the comparator is placed, and the crash actually prevents the comparator from being placed in the world. The crash can be mitigated by placing the comparator first, then placing the bloodstone afterwards.

commented

Oh, can you post your modlist here as well, and a link to the crashlog? just on the off chance that it's a weird mod interaction or something else i didn't see earlier.