OrderedChaos-Dev / ProjectVibrantJourneys

Minecraft mod that expands in all directions
37 stars 15 forks source link

If the animalsDensity is set to 0 it can cause an IllegalArgumentException when spawning entities #87

Closed LXGaming closed 4 years ago

LXGaming commented 4 years ago

Describe the bug I discovered this issue while debugging a crash in 'Life in the village' modpack.

https://github.com/mc-jt9/ProjectVibrantJourneys/blob/11e0399f2b1511e639c2eedd0738b5eb2f8acf8d/src/main/java/vibrantjourneys/init/PVJEntities.java#L155-L172

If the animalsDensity or mobsDensity are set to zero in the config then the multiplier will calculated to zero which means the spawn weight will also be calculated to zero this will later cause an IllegalArgumentException when Minecraft attempts to spawn the entity.

Crash Logs Same crash as https://github.com/mc-jt9/ProjectVibrantJourneys/issues/3

Mat323232 commented 4 years ago

Hey,how to edit the file...i don t known...

Mat323232 commented 4 years ago

How to edit the code?

LXGaming commented 4 years ago

@Mat323232 Simply change Animals Density back to 100 in the config, Any value lower than that has the chance to trigger the crash.

Mat323232 commented 4 years ago

I ve changed but now i have another problem with a mod Unknown

Il mar 26 nov 2019, 14:56 Alex Thomson notifications@github.com ha scritto:

@Mat323232 https://github.com/Mat323232 Simply change Animals Density back to 100 in the config, Any value lower than that has the chance to trigger the crash.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/mc-jt9/ProjectVibrantJourneys/issues/87?email_source=notifications&email_token=AN4GDK75LNTYGMRDWK3MFQLQVUTH3A5CNFSM4JKRVQF2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFGCTPY#issuecomment-558639551, or unsubscribe https://github.com/notifications/unsubscribe-auth/AN4GDK2E33FVI3EPHLE5GTTQVUTH3ANCNFSM4JKRVQFQ .