Jump to content

[1.16.4] minCount and maxCount seemingly ignored in biome spawns


Recommended Posts

I'm trying to make it so my mob only spawns in groups of one, using the code below

event.getSpawns().withSpawner(EntityClassification.WATER_CREATURE, new MobSpawnInfo.Spawners(ModEntityTypes.KRAKEN.get(), OutvotedConfig.COMMON.ratekraken.get(), 1, 1));

However the maxcount is completely ignored, and it's very rare for the mob to only spawn in a group of 1, it usually does it in 2 or more. This happens for both normal creatures and water creatures.

The same applies to mincount in this code

event.getSpawns().withSpawner(EntityClassification.MONSTER, new MobSpawnInfo.Spawners(EntityType.BLAZE, OutvotedConfig.COMMON.rateblaze.get(), 3, 4));

Where there should be a minimum group of 3, but I've seen blazes spawn in groups of only 1 or 2.


Am I just not understanding how biome spawns work?

Link to comment
Share on other sites

The following function is used to calculate the amount of entities to spawn: min + randInt[0, 1 + max - min). If you have a min and max of 1, at least one entity will spawn and at most one. However, there is no limit on how many times the spawner might be called. Also, entities can despawn or not spawn due to specific conditions as well which might reduce the amount to spawn. So, it's just a simple case of confirmation bias.

Link to comment
Share on other sites

You could implement your mob spawning in the form of a Feature that generates in the world. The only thing that feature would do when generating in the world is spawn one (and only one) of your custom entity type. The ice and fire mod for example uses features to make some of their entities spawn singularly

Check out the port of the BetterEnd fabric mod (WIP): https://www.curseforge.com/minecraft/mc-mods/betterend-forge-port

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...

Important Information

By using this site, you agree to our Terms of Use.