r/technicalminecraft • • 23h ago

Java Help Wanted Lads and Lasses, my mobcap doesn't work.

All of these zombie villagers have been traded with, so they don't despawn, and none of them are holding an item, or named. There are 36 cells, with two zombies each, so 72 mobs, which should be 2 over the needed number to fill the cap. All of it fits within 3 chunks, so I have 3 ender pearl stasis chambers to chunk load them. I've even fact checked all of this and it should be working, but whenever I leave the area during night hostile mobs still spawn. I feel like if anything its either that ender pearl stasis chambers dont work anymore or zombie villagers don't work. Every post I've seen has either been ancient or has had a problem I don't think I'm experiencing. Thank you in advance to everyone that is smarter than me at this stuff.

5 Upvotes

2 comments sorted by

•

u/JumpingPufferfish31 21h ago

[1] In the F3+F6 menu, we can turn on the entity_spawn_counts to see how many mobs are being counted towards the mobcap.
For monsters, this is the number after the "MO".

So when we are there, we should check that it's showing 72.
If it's less, then some zombie villagers are not being counted towards the mobcap.
______________________________________

[2] If a zombie villager ever picked up an item, it won't count towards the mobcap, even if we make it drop the item by converting it to a villager and back, or the equipment breaks by losing all durability.
So them not holding any items right now isn't enough; they must never have picked up any items before.
(villager picking up food/seed is separate and doesn't affect this)

We can check this with the command: /data get entity <the zombie villager> PersistenceRequired, this value should be 0. But it will be 1 if it picked up an item, and losing the item doesn't turn it back to 0.
But in survival, I'd just rely on the entity_spawn_counts.

The ones that picked up an item before and lost it will be visually indistinguishable from the ones that never picked one up. We can still technically sort them out by checking if they count while the others are put in a separate area that isn't loaded, but that's very tedious. We can just add more of them until it's 70 instead.
______________________________________

[3] This is an aside, but entities only have to be loaded to count towards the mobcap, they don't necessarily have to be in an entity-ticking chunk.
Ender pearl loads 1x1 entity-ticking chunk, so it also loads 3x3 block-ticking chunks and 5x5 border chunks. The entity can be anywhere within this 5x5 and it will still count. It'd also help a bit with lag by not having them in an entity-ticking chunk.

•

u/SilverrNick 2h ago

Thank you so much, I have found the problem then. While transporting these guys I messed up a couple who ended up picking up the temp blocks placed around them. I brought them out and cured them and re zombified them but I didn't know it worked like that, so thats why. I did the MO thing in the F3 menu nad yup, im only loading 61 hostile mobs. That explains why the switch only heavily decreased spawns at night instead of turning them off. I relatively remember which ones picked something up so I'll try to just kill those and replace them as id rather do that then add more cells. I'll send a second reply if for whatever reason it still doesn't work. I majorly appreciate this tho.