Untamed Wilds

Untamed Wilds

13M Downloads

Crash on server startup due to CritterBurrowBlockEntity.java:83 – IllegalArgumentException: bound must be positive

SrPedro345 opened this issue · 0 comments

commented

Hi, I'm getting a crash when running a Forge 1.18.2 server with Untamed Wilds version 2.4.3. The issue appears to be caused by the CritterBurrowBlockEntity#releaseOrCreateMob method calling Random.nextInt(0) or with a non-positive bound, which results in this exception:

This happens shortly after world load. The crash is consistent and prevents the server from starting properly.

Steps to reproduce:

  1. Install Untamed Wilds 2.4.3 on a Forge 1.18.2 server.

  2. Load a world that has a Critter Burrow block placed (possibly pre-generated).

  3. Server crashes during ticking phase.

Workaround:
Disabling burrows = false in the config seems to prevent the crash.

Suggestion:
Add a bounds check before calling Random.nextInt(...) to ensure the argument is strictly greater than 0.

Let me know if you need the full crash log. Thanks for your work on this awesome mod