mojira.dev
MC-306589

Villagers sometimes try to pathfind too many times in quick succession

Summary

A path finding sys or function is used to decide a Villager to move to a target (workstation, another Villager, Cat, etc.). However, in certain cases, this sys or function is invoked in quick succession.

In reporter’s opinion, this is suggested an issue since it weighs performance down. Methods are supposed to be pointed out to get this issue resolved.

Steps to Reproduce

Reporter’s note: This issue is able to be reproduced in many methods and could be regarded as successfully reproduced as long as the phenomenon mentioned above is observed in any kind.

  1. Insert JVM value: -DMC_DEBUG_ENABLED -DMC_DEBUG_PATHFINDING.

  2. Build either of structures shown in attachments below.

  3. Visible path finding of Villagers is shown and disappeared every tick.

Attachments

Comments 3

Thank you for helping us improve Minecraft! We saved your files:

[media][media][media][media]

Here’s another method available to reproduce, with simply placing a solid block above a workstation block. Villager memorials the workstation and attempts to path find it, and fails due to a solid block atop. It doesn’t give up, keep attempting path find it, and fails, and is stuck into an infinite trail-n-error.

With game is sprinting, a trail-m-error Villager occupies enormous of resource (186 TPS, seen in screenshot, comparing with normal stage, 275 TPS)

Reporter suggests that this may explain that some Villagers fail to path find a workstation in certain Village structures. This issue has been existed perhaps ever since Village and Pillage update. Reporter hopes that related issues could be posted here as well in the form of “is related to.”

2026-03-05_21.47.54.png

ZYX_2D

(Unassigned)

Confirmed

Platform

Normal

Mob behaviour, Performance

1.21.11, 26.1 Pre-Release 1

Retrieved