Valhelsia Structures

Valhelsia Structures

21M Downloads

Possible to crash world gen by configuring incorrectly

Calendis opened this issue · 3 comments

commented

My world crashed while exploring with
java.lang.IllegalArgumentException: bound must be positive at java.util.Random.nextInt(Random.java:388) ~[?:1.8.0_275] {} at com.stal111.valhelsia_structures.world.structures.AbstractValhelsiaStructure.func_236392_a_(AbstractValhelsiaStructure.java:160) ~[valhelsia_structures:16.0.5] {re:classloading}

Looking at line 160 in the source, I see i1 = sharedSeedRand.nextInt(spacing - separation);

Well, looking at my config, this was my fault as my spacing and separation were set to be equal. However I think catching this condition, crashing gracefully, and telling the user what they did wrong would be good, especially for non-technical users.

commented

This is a known issue, but agreed, it should be presented in a better way to the user so they can fix it more easily.

commented

There's now a clear error message displayed if incorrect values are entered, although the version with this fix won't be released until we've finished the rest of the Jungle update.

commented

Fixed in the latest version (1.16.5-0.1.0).