MehVahdJukaar / Randomium

1 stars 6 forks source link

[1.18.1] Division by Zero in "getAnyItem" method #8

Open TBiscuit1 opened 2 years ago

TBiscuit1 commented 2 years ago

crash-2022-03-27_16.21.49-client.txt Don't ask me how or why it happened but it seems that the SHUFFLED_ANY_ITEM ArrayList was empty and so the size was 0, causing a division by zero ("time % size" in getAnyItem in the "Randomium" class)

I will further test out why the ArrayList was empty (If it's a random mod that cause the whole thing or Randomium alone causes the crash basicly)

TBiscuit1 commented 2 years ago

Extended Creative Inventory causes the crash

MehVahdJukaar commented 2 years ago

Hm i wonder how it does that tho. It's probably accessing that stuff too early where it is indeed empty. I'll make it more resilient