Pipez

Pipez

31M Downloads

Adding filter to item pipe causes divide by zero ArithmeticException

tabeaDargatz opened this issue ยท 1 comments

commented

Bug description

The game crashes when I try to add a new whitelist filter with the tag "#forge:vegetables"
error seems to be "java.lang.ArithmeticException: / by zero" according to the crash report

I know I am using an older version of the pipez mod, but the crash report mentions the file src/main/java/de/maxhenkel/pipez/gui/FilterList.java
specifically line 265 which I think on the newest version of that file is line 260:
return allElements.get((int) (time / 20L % allElements.size()));

It seems to me like you would indeed still run into a divide by zero error when allElements.size() returns 20, 40, 60 and so on.

Minecraft version

1.19

Mod version

1.19.2-1.2.16

Mod loader and version

Forge 43.3.5

Steps to reproduce

  1. Put down a chest and add an item pipe to it
  2. Change the pipe with the wrench to output items from the chest
  3. Open the menu of the output pipe and add a diamond upgrade
  4. Try to create a new filter with the tag #forge:vegetables
    Result: after the "l" of vegetables, the game crashes

Note: This is reproducable both on my friends (survival) server and a singleplayer (creative) world I used for testing

Expected behavior

No response

Log files

https://gist.github.com/tabeaDargatz/2a72fd64448d939d2bdce1f134b9133f

Screenshots

No response

commented

1.19.2 is no longer supported