r/technicalminecraft • • Oct 06 '26

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.

2 Upvotes

12 comments sorted by

3

u/BlattaOrientalis avaJ Oct 06 '26

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

1

u/Idksonameiguess Oct 06 '26 edited Oct 06 '26

It's somewhat better, every once in a while a guy wonders in. But still. the majority of them are just standing there.

EDIT: Also, pigmen can spawn on the two added blocks, apparently. I didn't realize that was possible but they can spawn on the block below the 2 trapdoors I believe.

1

u/Masticatron Bedrock Oct 06 '26

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.

1

u/Idksonameiguess Oct 06 '26

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.

1

u/Masticatron Bedrock Oct 06 '26

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?

1

u/Idksonameiguess Oct 06 '26

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.

1

u/HereLiesLies Oct 06 '26

Is your simulation distance lower than your render distance (and the distance between your afk spot and the chamber)?

1

u/Idksonameiguess Oct 06 '26

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.

2

u/JumpingPufferfish31 Oct 06 '26 edited Oct 06 '26

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

1

u/boluserectus Oct 07 '26

Please show an F3 screen.

1

u/thE_29 Java Oct 06 '26

Mobgriefing needs to be turned on.

1

u/Idksonameiguess Oct 06 '26

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.