When the player teleports to or respawns at an area, mobs can spawn while chunks are still loading in, meaning that once all chunks have loaded in, the mob cap may have been exceeded. If the player then teleports away and then back, the mobs will not have had an opportunity to despawn, meaning the mob cap can be exceeded by an arbitrary amount.
I have only successfully tested this in creative mode with acquitic mobs and endermen in the end, and while I do not know how practical it would be to exploit this behavior in survival mode, I do not think there are many opportunities to gain a large advantage over searching for mobs normally. Farming fish and nautilus shells by spawning large numbers of these mobs by repeatedly going to the nether and back may be feasible. It should also be possible to accumulate large numbers of hostile mobs by building a massive platform in the sky with a portal at its center, but the player would have to do battle with these mobs normally, as collecting the mobs near the portal, with water streams or otherwise, would reduce the efficacy of the setup. Spawning large numbers of wither skeletons and blazes would be practical only after making major alterations to the fortress, and only after removing the ability for other mobs to spawn outside of it. Passive mobs, and mooshrooms in particular, would in theory seem to be good candidates for farming in this way, but I can’t seem to reproduce this issue with mooshrooms- perhaps they have some other spawning requirement I do not know about.
To reproduce
Ensure your render distance is 10 or higher
Make a new creative world with seed
-5279226984512571393/setworldspawn -649 63 126/execute in minecraft:the_end run teleport @s 4 72 4/kill @n[type=minecraft:ender_dragon]/forceload add ~ ~/scoreboard objectives add mobs dummy/scoreboard objectives setdisplay sidebar mobsPlace and power a repeating command block in the forceloaded chunk with
execute as @r at @s store result score nautili mobs if entity @e[type=nautilus]Place, connected to said command block, an unconditional, always-active chain command block with
effect give @e[type=minecraft:nautilus] minecraft:glowing infinite 0 trueJump in the fountain
Press Esc to skip the credits
Without moving, look out at the ocean
All the nautili are glowing, and the number of nautili you can see matches what is displayed in the sidebarRun
/execute in minecraft:the_end run teleport @s 1 72 1repeatedly
❌ After several executions, the number displayed in the sidebar will significantly exceed the Water Creature mob cap of 5Look out into the ocean
❌ It is filled with glowing nautili
Expected behavior
Some check would prevent this from happening (the player teleported too recently, or too many spawn-valid chunks within their render distance are still unloaded)
Video
In this video, I used a slightly different command in the repeating command block.
Can confirm