Zombie villagers do not count toward monster population caps
Expected Results: Zombie villagers would count toward either the surface or cave monster population control cap depending on where they spawn.
Observed Results: Zombie villagers do not count toward either population control cap, no matter where or how they spawn.
Steps to Reproduce:
- Create a spawn testing world with 2 1-chunk platforms in the middle of spawn-proof 9x9 chunk area. Set up one of these platforms as surface and the other as cave.
- Set time to midnight and turn off the daylight cycle.
- On either platform, collect zombie villagers in either of 3 ways:
- Wait for them to spawn naturally, killing other monsters to keep the density caps open.
- Spawn villagers with spawn eggs and allow them to be killed by zombies or drowned on normal or hard difficulty.
- Spawn zombie villagers directly with spawn eggs.
- Kill all other mobs on both platforms, except the zombie villagers.
- Move at least 24 blocks away and wait for natural monster spawns.
- Eventually, 8 new non-zombie-villager monsters will spawn on each platform (surface and cave).
Created Issue:
Zombie villagers do not count toward hostile/monster mob density caps
Expected Results: Zombie villagers would count toward either the surface or cave monster density cap depending on where they spawn.
Observed Results: Zombie villagers do not count toward either monster density cap, no matter where or how they spawn.
Steps to Reproduce:
- Create a spawn testing world with 2 1-chunk platforms in the middle of spawn-proof 9x9 chunk area. Set up one of these platforms as surface and the other as cave.
- Set time to midnight and turn off the daylight cycle.
- On either platform, collect zombie villagers in either of 3 ways:
- Wait for them to spawn naturally, killing other monsters to keep the density caps open.
- Spawn villagers with spawn eggs and allow them to be killed by zombies or drowned on normal or hard difficulty.
- Spawn zombie villagers directly with spawn eggs.
- Kill all other mobs on both platforms, except the zombie villagers.
- Move at least 24 blocks away and wait for natural monster spawns.
- Eventually, 8 new non-zombie-villager monsters will spawn on each platform (surface and cave).
Zombie villagers do not count towardhostile/monstermob density caps
relates to
Zombie villagers do not count toward mobdensity capsZombie villagers do not count toward monster density caps
Expected Results: Zombie villagers would count toward either the surface or cave monster
densitycap depending on where they spawn.Observed Results: Zombie villagers do not count toward either
monster densitycap, no matter where or how they spawn.Steps to Reproduce:
- Create a spawn testing world with 2 1-chunk platforms in the middle of spawn-proof 9x9 chunk area. Set up one of these platforms as surface and the other as cave.
- Set time to midnight and turn off the daylight cycle.
- On either platform, collect zombie villagers in either of 3 ways:
- Wait for them to spawn naturally, killing other monsters to keep the density caps open.
- Spawn villagers with spawn eggs and allow them to be killed by zombies or drowned on normal or hard difficulty.
- Spawn zombie villagers directly with spawn eggs.
- Kill all other mobs on both platforms, except the zombie villagers.
- Move at least 24 blocks away and wait for natural monster spawns.
- Eventually, 8 new non-zombie-villager monsters will spawn on each platform (surface and cave).
Expected Results: Zombie villagers would count toward either the surface or cave monster population control cap depending on where they spawn.
Observed Results: Zombie villagers do not count toward either population control cap, no matter where or how they spawn.
Steps to Reproduce:
- Create a spawn testing world with 2 1-chunk platforms in the middle of spawn-proof 9x9 chunk area. Set up one of these platforms as surface and the other as cave.
- Set time to midnight and turn off the daylight cycle.
- On either platform, collect zombie villagers in either of 3 ways:
- Wait for them to spawn naturally, killing other monsters to keep the density caps open.
- Spawn villagers with spawn eggs and allow them to be killed by zombies or drowned on normal or hard difficulty.
- Spawn zombie villagers directly with spawn eggs.
- Kill all other mobs on both platforms, except the zombie villagers.
- Move at least 24 blocks away and wait for natural monster spawns.
- Eventually, 8 new non-zombie-villager monsters will spawn on each platform (surface and cave).
Zombie villagers do not count toward monsterdensitycapsZombie villagers do not count toward monster population caps
Edit 2/10/20: added information about targeting villagers, based on my own testing.
The drowned despawning tweak introduced in 1.13 is only a partial fix to this bug, as Mega_Spud states in his 9/19/19 comment above. There are 2 further factors that still lead to the accumulation of drowned in pools and rivers:
- Bedrock’s persistence rules grant persistence to monsters that target the player or villagers. This means that the drowned despawning tweak mentioned above can be defeated by the player simply walking past a pool of drowned, or by a villager walking within about 40 blocks of a pool of drowned. Note that zombies and their variants "see" villagers through solid blocks, so they will target them even behind walls, in houses, or through the ground. So effectively, drowned generally will not despawn if they are within 40 blocks of village boundaries, and possibly much farther if you have nitwits wandering about. (Villager targeting is also why the pools only contain zombie variants. Other monsters do not target villagers and therefore they despawn regularly.)
- Converted drowned count as cave monsters (MCPE-61721). This allows zombies to continuously spawn on the surface, fall into pools, rivers, and oceans, and drown, building up the huge numbers of drowned seen in the pictures on this report. Zombie villagers also accumulate indefinitely with the drowned because they do not count toward either monster density cap (MCPE-62030).
Yes it is more clear now, sorry for the delay in my reply. I happen to have recently built a button/trapdoor creeper farm like you describe. With just 1 level, my farm is very slow. However, I think this design will be slow even with many levels. Consider that with 1-wide rows with 1-wide air between and buttons on every other block, it allows only 1/4 of the blocks in the chunk to be viable spawn spots. Since the spawn algorithm picks random x, z coordinates to attempt spawns, this is going to make the spawning in the farm go at 1/4 the rate of a solid 16x16 platform. I just tested a 1-level setup like this in creative and got 1 creeper in about 2 minutes. When I use solid platforms for testing other things spawning is much faster.
You mentioned 2 1/2 height–did you mean 1 1/2? I believe the trapdoor on the ceiling should make the available space 1.8, and creepers are 1.75 blocks tall, while other mobs are 1.95. When I build it, I do get only creepers spawning.
Are you alternating the button locations on different levels? That could double your available x, z coordinates available for spawning within the farm, and increase the rates.
I can assure you that cave and surface caps are not combined. Sometimes they are not applied like you might expect though (I've been experimenting with that and created MCPE-61721, MCPE-62030, and MCPE-60552 as a result.)
As far as I can tell the spawning in a sphere 24-54 blocks away from the player is still how it works.
I think there could be something to the preference for wider than 1 block spaces, as I have noticed in my witch hut testing that structure witches only spawn if blocks adjacent to the spawning block are also solid with air above. But I do see creepers spawn in the farm with buttons on every other block, so I know it works (just slowly!)
You don't mentioned spawn-proofing the density check area, but you do mentioned spawns on the ground and solid platforms below. To get the farm to work you do have to spawn-proof all 80 chunks around (9 x 9).
Clarification on Witch Respawns being blocked: My statement in the description about pack spawns exceeding the density caps may be be based on a misunderstanding. While I have, rarely, observed more than 8 cave or surface monsters spawn in a chunk in spawning tests, I now believe those instances may all have been due to MCPE-62030. So I cannot confirm that pack spawns ever go in excess of a density cap.
There are other ways that the cave monster density cap can be exceeded, however. Large and medium slimes dying and producing multiple smaller slimes is one way. This could conceivably occur without being cause by the player, for example by mean of falling, magma blocks, or being pushed by another mob into a position that causes suffocation.
Another way the cave monster density cap is frequently exceeded is by surface zombies drowning--see MCPE-61721.
So, although I may have been mistaken about pack spawns specifically, there are still many ways that witch respawns in witch huts can be blocked due to interaction with the cave monster density cap, despite the +1 cap room given with the witch hut structure.
I've completed my testing after correcting my mistake and I now concur that 1.14.20 has reverted to the 1.13 behavior. However, I have a couple of questions and a new observation.
- Neither of you made a distinction between bottom slabs and top slabs for triggering surface spawns below them. I find that bottom slabs trigger surface spawns but top slabs don't. Do you agree?
- My tests indicate that carpet, leaves, glass, and even lanterns on the surface now work the same way as bottom slabs and stairs do. My recollection from 1.13 is that only leaves, bottom slabs and stairs triggered surface spawns below them. I was building a dual layer mob farm at the time and I remember experimenting with several other kinds of transparent blocks and finding that none of them had the same effect. I might be remembering wrong, though. How certain are you that other transparent blocks—such as carpet, glass, and lanterns—worked the same way before. (I feel like this is a difference from the 1.13 behavior.)
The new observation is this: I noticed that several mobs almost always spawned on my deep ("cave") spawn floor before any spawned on my shallow ("surface") spawn floor. There was only one exception in all my dozens of tests. I can't explain this, as the way I understand it the spawn logic should be searching downward and spawning as it goes. Do either of you have any insight to offer?
GoldenHelmet discovered that zombie villagers aren't counted against their density cap during spawning (see MCPE-62030).
This bug probably affects husks converting to zombies as well, but my test environment does not naturally spawn husks, and I am not command-savvy enough to quickly make another test setup in a desert. The fix for his bug should be applied to husk-zombie conversion, and probably to pig-pigman and villager-witch conversion as well (because why should a thunderstorm fill up the cave density cap?). Thunderstorms I can test more easily and will update when I do. This bug does NOT affect villager-to-zombie villager conversion because of another bug, MCPE-62030.
Update: converted zombie pigmen and witches count against the cave monster density cap, too.
Udpate #2: medium slimes that spawn when you kill a large surface-spawned slime also count as cave mobs. (I observed this in my witch hut testing area, which is similar to the test setup described for drowned above but built around a witch hut in a swamp biome. I ran a /kill @e command when only 1 slime was on the surface platform (Y=69), which caused 4 medium slimes to spawn on the surface platform. I then waited for further spawns. 8 new monsters spawned on the surface platform where the medium slimes were, and only 4 monsters spawned on the cave platform below.) If this is fixed so that the medium slimes spawn with a surface tag, you should also make sure that the small slimes that spawn when you kill a medium surface slime will spawn with a surface tag as well.
After looking over this report again, I think it is just incredible. The OP observed
- villagers missing from minecarts in a sealed room
- zombie villagers in the room, numbering about half the number of missing villagers
- no zombie in the room
- a roughly equal number of zombie villagers in a nearby lake
The most likely explanation is that
- The room was not adequately lit. (We get a lot of reports saying monsters spawn in "well lit" areas, where it turns out the light level calculations have not been understood or done correctly; see
MCPE-302.) - A zombie villager spawned and attacked the villagers, killing half and converting half to zombie villagers. (This would be the expected proportion for normal difficulty.)
- The zombie villagers in the nearby lake just spawned randomly and wandered into the lake by chance. (Zombie villagers accumulating in lakes along with drowned is a known issue; see
MCPE-34032and MCPE-62030.)
SuprD's and Shonna White's reported cases can be explained similarly. Possibly there are two additional factors:
- random villager despawnings (
MCPE-21416) - zombie villagers spawning in an unlit area then walking into the lit area after targeting a villager (Zombie villagers can target villagers at a distance of 35 blocks.)
Monster Density Tester.mcworld
can be used to compare the effective density of "mobs around the player" on different simulation distances. In it, the player stands on the chain command block at 8, 8 and presses the stone button on the impulse command block to start a new test. A scoreboard system tracks time elapsed in seconds and continuously updates counts of monsters within 45 blocks and within 65 blocks. On Sim4 both counts are always the same because monsters despawn and cannot spawn past 44 blocks from the player. 65 blocks was chosen for the larger radius because that is roughly both the range at which mobs are rendered in Bedrock Edition, and the largest follow range for monsters (e.g. ghasts), so I thought that might be what was meant by "mobs around the player".
Demos running the test world for 1 minute on Sim4 and Sim6:
- Within 45 blocks of the player, the number of monsters on Sim6 tends to be more than 50% lower than the number of monsters on Sim4.
- Within 65 blocks of the player, the number of monsters on Sim6 tends to be ~20-40% higher than the number of monsters on Sim4.
- If you compare the number of monsters to the monster-viable space being tested here, i.e. r45 on Sim4 and r65 on Sim6, then
- For the 2D area the effective density on Sim6 is about 2/3 or 67% of the density of Sim4.
- For the 3D volume the effect density on Sim6 is just less than 1/2 or 50% of the density of Sim4.
Some further technical notes on the test world:
- It uses the overworld surface monster cap, which is the same (8) as the beta nether monster cap.
- Every x, z coordinate is spawnable: There is a 51 x 51 spawnable platform 25 blocks above ground centered over the player, which fits entirely in the Sim4 spawn radius. The ground under the elevated platform is replaced with glass to block cave spawns.
- The fact that nether spawns can occur on multiple Y-levels in a column is not likely to make much difference; if anything it might sometimes cause a few more monsters to aggregate at the edges of Sim4 (>32 blocks from the player on either side, where one side doesn't cap spawns on the other side), but the cap totals will still be the same.
- The Sim4 spawn radius is marked by polished granite.
- Zombie villagers are killed instantly so that they do not skew results. Zombie villagers do not count toward any cap (MCPE-62030).
- Phantom spawning is disabled so that it does not skew results. Phantom's special spawn behavior makes them block spawns in different places from where they spawn (
MCPE-106557).
Confirmed on 1.14.20 Hotfix, Windows 10.
If a simple, isolated spawn floor is set up for either surface or cave spawns and the game is allowed to spawn monsters there, it should only be able to spawn 8 mobs before the density cap stops further spawns. However, it turns out that if the spawned mobs include zombie villagers, you can get more than 8 mobs there. If you then kill the zombie villagers and no more of them spawn, the 8-mob limit goes back into effect.for the mobs spawned to replace the zombie villagers.
In outside discussion, GoldenHelmet and I speculated about whether this behavior might be intentional, perhaps so that monsters would still spawn at night outside a village filled with zombie villagers. That left me wondering whether the density cap could block zombie villagers from spawning, so I tested that and found that it can. It doesn't seem sensible to me that the density cap should block zombie villagers from spawning, but that having spawned they wouldn't contribute to blocking other monsters from spawning, so I'm more convinced now that this is a bug and not intended behavior.
The reason zombie villagers do not count toward the monster population cap is that there is no zombie_villager_v2.json in the spawn_rules folder of the vanilla behaviors. This also means they do not count toward the global mob cap since 1.16.0.
In addition to the point Auldrick raised above about allowing monster spawns around abandoned villages, this setup also prevents what would be a too-easy method of spawn-proofing: if zombie villagers blocked monsters, you could just let one zombie into a pen of villagers to spawn-proof all of the cave across an entire density-check area. No collecting and name-tagging monsters would be necessary b/c the villagers can be bred on-site and they automatically have persistence.
The reason zombie villager spawns are still blocked by the cap is that they don't spawn directly, they permute from zombie spawns. So the zombie spawn rules are what apply.
It's been a while since I reviewed this, and I've learned more about how spawning works in the mean time. I now agree with [Mod] GoldenHelmet's analysis that this is probably working as intended. I don't think there's any question that zombie villagers spawned through player actions should not be counted toward density caps. The only question is whether so-called "naturally" spawned zombie villagers (those that transformed with a 1/20 chance from naturally spawned zombies) should be counted.
The problem with doing so is that the only way to count them under the current architecture is to check all the zombie villagers in the density cap volume and only count the "natural" ones. The spawn cycle runs as part of the main game loop, so this would add the maximum possible processing burden, multiplied by the total number of zombie villagers present. So if you count them, it's going to lag the game if the player happens to be near a large collection of zombie villagers, and on a low end mobile device it could make continued play impossible.
But that's only true if a lot of them congregate, so how likely is that? For "naturally" spawned zombie villagers, it's not likely at all because with a 1/20 chance, only a small number would ever be likely to spawn in the density cap volume. But it's the otherwise spawned ones that would get you:
In the second of these scenarios, Mojang would have no control over how many zombie villagers were present and therefore couldn't do anything to prevent crippling lag. In a multiplayer setting, it would affect everybody and could easily be caused by somebody who didn't even know they were getting too close to the zombie villagers. So I can readily see why Mojang might find it preferable to let a couple of extra monsters spawn than to try and avoid it.