Project: Vibrant Journeys

Project: Vibrant Journeys

18M Downloads

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

LXGaming opened this issue · 4 comments

commented

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 #3

commented
commented

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

commented

How to edit the code?

commented

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