Posted November 13, 20205 yr 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?
November 14, 20205 yr 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.
November 14, 20205 yr 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
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.