Pokecube-Development / Pokecube-Issues-and-Wiki

This is where all issues for the core pokecube mods should go, also this is where the main wiki should be maintained
MIT License
30 stars 24 forks source link

Pokecube prevents regular mob spawning in newly generated chunks in modded dimensions that needs those mobs #722

Open TelepathicGrunt opened 3 years ago

TelepathicGrunt commented 3 years ago

I noticed that when I included Pokecube alongside my mod, the Bumblezone, newly generated chunks were completely void of any mob when they should had spawned my bees and honey slime when made. Tracking down the code path, I found that pokecube were denying my vanilla bee spawns in the SpawnReason.CHUNK_GENERATION phase which is an issue as my dimension relies heavily on vanilla bees. https://github.com/Pokecube-Development/Pokecube-Issues-and-Wiki/blob/67459f0e9d25ef15820302ce2f4c3f417af05332/src/main/java/pokecube/core/handlers/events/EventsHandler.java#L583

Here's the screenshot of the debugger where I found the issue image

I hope this helps!

Perhaps a dimension whitelist can be added here instead of a blanket disabling of mobs in all dimensions?

Thutmose commented 3 years ago

in that case, just re-enable the vanilla animal spawning, that PokecubeCore.getConfig().deactivateAnimals there is a config option

TelepathicGrunt commented 3 years ago

Except if I do that, won't that affect other dimensions and the overworld as well? I rather not automatically change the user's config setting but just want to enable animals only in my dimension by default. I can't just turn it off and on before and after mob spawning as I do not have access to the natural mod spawning in already generated chunks

Thutmose commented 3 years ago

My mistake, I thought this was a modpack related issue, not a specific mod compatiblity related issue

Thutmose commented 3 years ago

I modified the mob removal code to also do a dimension check. If the namespace for the dimension is not "minecraft", or specifically added to a config option, then that mob will not be removed.