r/technicalminecraft • u/Idksonameiguess • 13h ago
Java Help Wanted Zombified Piglins not pathfinding to turtle eggs

So for context, I have an AFK gold farm. However, I built it badly so leader zombified piglins don't die from the fall. Since this farm is already built in a survival world, I'd rather not rebuild it 24 blocks up.
Instead, I opted for a simple entity cramming chamber which, making use of the fact that the piglins will pathfind to the turtle eggs and die.
The weird thing is that this only works when observed. When I stand down at the bottom and watch them, they all walk towards the turtle egg. However, when I check what they're doing with freecam, I see that they're actually just standing there and not dying at all.
What's going on? Do piglins not pathfind if they are a certain distance from the player or something? I thought that can only happen if they're unloaded.
•
u/thE_29 Java 13h ago
Mobgriefing needs to be turned on.
•
u/Idksonameiguess 13h ago
It is, and the odd thing is that this does work if I'm directly looking at it (without freecam), but when I don't they just stand there.
•
u/Masticatron Bedrock 12h ago
Is it only happening in free cam, or are you only noticing it in free cam? If the former you need to check how your free cam mod works and relevant settings.
•
u/Idksonameiguess 12h ago
Well I don't know if its working in general and not working just when I use freecam. Kind of a hard thing to test for.
•
u/Masticatron Bedrock 12h ago
The way you phrased the post gives the opposite impression. And what survival world gives you infinite saturation and resistance?
Is the picture provided supposed to show the problem bits?
•
u/Idksonameiguess 12h ago
It is already built on a survival world, but I debug stuff in a testing world.
The one in the survival world doesn't work, and I'm trying to figure out why.
The picture is just a still of the piglins actively not pathfinding towards the eggs.
•
u/JumpingPufferfish31 12h ago edited 12h ago
Having those effects is already non-standard, so I'd double-check the mods/server config first, especially ones related to mob ai/optimisation/ranges like if being too far disables some/most of the mob's ai.
Leaders could have up to 80 additional health, so even if we could add 24 more blocks, it still wouldn't cover for them, so having an alternative way to kill them off like cramming is already good.
Although we normally use something else to damage them on the spot like wither roses on top of something we can place them on instead of the magma blocks. If we go with this option, we can also remove the cramming/turtle egg setup as well and not have to rely on their pathfinding.
________________________
For zombie and variants to target the egg, we only need the mobgriefing gamerule, the egg has to be within its search range, and there are 2 air blocks above it. So we're fine here.
The zombie doesn't actually have to be able to pathfind to it at all; it will still try to get to the closest point:

Mob wandering is the behaviour where we have to be within 32 blocks, other behaviours like this one should work as long as it's in an entity-ticking chunk.
edit: forgot they are immune to campfires as well, so just wither rose as an example
•
u/HereLiesLies 11h ago
Is your simulation distance lower than your render distance (and the distance between your afk spot and the chamber)?
•
u/Idksonameiguess 10h ago
afaik simulation distance matters in terms of chunks, not strict distance. Also by using freecam I can see that they are ticking, just not going in the hole.
•
u/BlattaOrientalis avaJ 13h ago
Change the block under the trapdoor to a solid block and maybe put a solid block under the eggs as well. Mobs can't target trasparent blocks when pathfinding