[1.20.1] Modifier for spawn probabilities is not properly limited.
bconlon1 opened this issue ยท 1 comments
It seems that if too high of a value is assigned to chunkGenSpawnModifier
in Citadel's config, it is capable of stalling certain biomes dependent on what their creature_spawn_probability
value is set to. Due to how NaturalSpawner#spawnMobsForChunkGeneration
uses a while loop that depends on checking a random float against the probability value, this means that the probability value can never be 1.0 or larger. For Vanilla, the default probability value given to biomes is 0.1, so it takes as high as a multiplier modifier of 10 to cause the Overworld to stall from an infinite spawn loop on generation. This can be more noticeable with other mods such as The Aether, which has a value of 0.25, and thus got noticed as stalling out with a modifier of 4 (The-Aether-Team/The-Aether#1825). This infinite loop runs until the game runs out of memory and crashes. Fixing this would likely be doable by adding some kind of min-max check here
yeah. I've been looking around for days trying to figure out what was causing runaway spawns in my world (literal hundreds of squids anytime i got near an ocean, for example), and finally nailed it down to this setting works. when set to it's default of 1.0 it is effectively disabling spawncap in my world. I had to dial it down to .125 to have something reasonable.