mojira.dev
MC-151376

Villagers are not pathfinding towards their POI; POI detection range is too small

This includes beds, work stations and bells. Some villager are not going to struggle pathfinding towards a point of interest.

Very Important Update on this Issue

The Bug still remain up to this Date in 1.14.3, but there's a very important observation I noticed in a Village on a Survival World, the thing is that thanks to this Issue lot of Villagers were not able to reach a Bed during Night and around 5 died, with 4 remaining Villagers that could barely reach their POI I was able to breed them but something very interesting I noticed was that after a good time the Baby Villagers grew up and got a Profession, for my surprise these Villagers handled a way more better AI, overall they could Pathfind significantly better to the Meeting Points, Work Stations and Beds. BUT! This doesn't mean this Issue was not present here, the Wander Schedule is very conflicting with the short Range of the Villagers, I notice them in the Mornings walking far and then when it's Work Time they just remain stuck because they lose track of the Work Station, this can be fixed if Villagers gets the Detection Range back to how it was in 1.14 and make the naturally generated Villager have this better AI from beginning because it's annoying being forced to Breed a new Generation of Villagers, currently all of the Naturally Generated Villagers are dead, yes the remaining 4 eventually died because they also seem to don't care for fall damage or they Wander outskirts of the Village very far away, but even the new Generation of Villagers still struggle with these problems but it's noticed less since the improve on the AI patches these inconsistencies a little bit more.

Another thing I noticed along with this issues is that villagers have a lot less range of detection for their POI, compared to 1.14 they have a more short range, this comes to be a game breaking problem for big villages, where previously villagers had no problem traveling a good amount of blocks to reach their POI.

⚠️ Only these 2 villagers went to the meeting point

[media]

Besides that, as you can see they are not trying to pathfind to a bed, there's a lot of free beds around this village

  • Free bed

    [media]
  • Not very far away from the meeting point

    [media]

More examples of this

[media]

This villager is even very, very close to a bed

[media]

This one as well, as you can see the bed is free

[media][media]

They remained like this the whole night, I had to set the difficulty to peaceful in order to prevent zombies killing them.

[media]

Until the morning

[media]

This issue also causes villagers to lose their professions

Remember the fletcher that was not sleeping?

[media]

Here's now

As you can see, the fletcher house is not very far away and it's not getting the fletcher profession back, there's not even attempts to pathfind towards a free work station, prior to 1.14 their behavior was different and better at the moment they were looking for a POI

[media]

It's like less than 20 Blocks

[media]

Linked issues

Attachments

Comments

violine1101

Does MC-151126 describe your issue (with not only beds, but also workstations affected)?

migrated

That Issue seems to be related to the Door Problem in 1.14.1 Pre-Release 1. MC-151097 Bug that was fixed on this Version. This one on the other hand can be reproduced in open areas without Doors, for example in Meeting Points, Villagers are not Pathfinding towards these Places anymore.
Very rarely you will see a Villager getting close to this POI

violine1101

Hmm, alright, leaving this open then

migrated

Probably related, but Villagers fail to recognize that they can't move through transparent blocks or blocks that are arranged one diagonally from the next. So you end up with Villagers jumping repeatedly trying to get over a block. They sometimes even stay jumping or standing in front of a block (trying to walk through) even though right next to them or near them is an open space.

[media]
violine1101

@unknown, that issue is MC-142817 and should be fixed as of 1.14.1-pre1.

migrated

In a newly generated village, there seem to often be villagers that stay outside at night because there are not enough beds in the village, or they are simply too far away. Build a wall between a villager standing outside at night, then place a bed behind the wall, out of the villager's line of sight. The villager will not see it. Remove the wall, and then either immediately or within a few seconds, the villager travels to the bed. The villagers used in the test were all pre-generated villagers. Villagers summoned from spawn eggs could see past walls and found the hidden beds, but the long range issue still applied.

Recreating the bug has failed in the following circumstances: 1) when the villager couldn't move when it spawned in a slab ceiling in mid air, 2) when a villager seemed to be stuck to a potted cactus next to the bell in the centre of a village and 3) the bed was too far away, although the distance was actually quite short (approx. 20 blocks away). The first two were in desert villages. Number 3 can happen in any. With beds that are considered too far away by the villager, the wall test fails - there are empty, pre-generated beds in a village at night but some villagers as still standing outside (removing house walls does not fix the issue).

migrated

Interesting observation with the Wall. I am aware of some Villagers keeping outside sometimes, in 1.14 Mojang needed to make 4-2 Villagers generate in each Meeting Point to prevent low population outputs of Villagers, but previously in 1.14 these Villagers without Bed at least tried to Pathfind around the Village in a search of a Bed, now even Villagers with an assigned Bed can't even detect their Home, this problem can be reproduced often in the early Morning, when a Villager has a Wander Schedule, here they will wander outskirts of the Village and after that some will not return to their Homes. Like I said in 1.14 they tried to locate back their Home/Work Stations this because:
1) They had a much wide detection range, I don't know if Mojang decided to cut this due to Optimizations. Hopefully not because this problem is contradictory to how they currently Interact, with the Wander mechanic they seem to travel lot of blocks aimless around the Village.
2) The Issue that I am highlighting, they are not Pathfinding correctly even when they are very close to their POI, like you also displayed with the Wall Example, currently the Pathfinding for their POI also has Problems.
3) The Mechanic to reach a POI is definitely not the same since now Villagers instead of walk around in the Search of a POI they remain stuck in the same place.

migrated

I tried the wall test with workstations by sticking Nitwits into boats and slowly edging them towards a workstation behind a wall and only stopping when they acquire the profession. They still seem to find it behind walls (unlike the beds), but the range seems to be less than 10 blocks (8 at a guess) - I've tested a few and none seemed to notice the workstation further than that. With beds, I think the range is under 15 (I've had 14 blocks a couple of times) - I kept placing beds 1 block closer to night-standing villagers starting from 30 blocks away with 5 second time gaps to allow the path finding system to update until the villager ran towards it. I have reason to believe those are the ranges. Also, the path finding system is lagged, so if I were to summon a villager outside of a village and then drive them in by boat, they would at first run away from the village, and then, after some time, turn around and run back (my point is that it seems to take some time to update, which is why the incremental time gap between placing beds and moving villagers closer to workstations was necessary).

One thing that thew me off was that baby villagers noticed the beds further and before the standing adult villagers did - there were two babies that spawned and did that but I couldn't check further since no other baby villagers spawned naturally in other worlds I created.

migrated

Confirmed for 1.14.2 Pre-Release 1

Something that I noticed is that Villagers will prioritaze share Gossip and Wander over follow the Pathfindig for a POI. You can see this in Villagers that generate in the Meeting Point of the Village and instead of search for a Workstation they will remain in this place with the other Villagers.

migrated

My villagers have been gradually walking towards the North of the village, outside of their POI range. They no longer respond to the bell sound nor do they restock their inventory. They eventually get killed and are lost and the village will not "restock their villagers" (breeding).

This has happened all the way from the start of 1.14 'till 1.14.2 release. Attached is a picture simulating what happens.

[media]
migrated

yes, due to this, I have 3 ghost towns now.  2 towns have only 1 villagers(which I succeeded trap inside a wall before they travel away

migrated

My villagers are broken since 1.14.2. I play on a server. They just stopped moving, or working, gossiping, or refreshing trades. They dont do anything.

migrated

I found something very interesting. I have a house with two floors and villagers who go to the second floor lost their workstations because they want to go STRAIGHT to their POI coordinates, no matter Y coordinate is, instead of using the stairs (stairs are 10 blocks away from the balcony), I also faced that issue when villagers go behind a building and they want to go straight from its actual position to their workstations. 

migrated

Villagers who are not spawned by players (pre-generated villagers) still have this problem, so for survival players, this issue is not resolved. However, the villagers that are spawned by the player, i.e. with a spawn egg, are much better at path finding to a far away bed at night, and so for them, the issue is resolved. Pre-generated villagers, however, are still broken and will freeze/cease to move at night. They will remain in the same spot until morning without attempting to search for a bed. This is the case in 1.14.4 pre 2. I have not yet checked whether villagers that are spawned using spawn eggs retain their pathfinding abilities on following nights or if they soon adopt the same behaviours as pre-generated villagers the following nights.

[media]

migrated

Yeah can confirm that this is not resolved for pre-generated villagers, this was a test with a Cartographer House.

[media]

[media]

Irbis

Reopen please, as Carlos G. found this bug unresolved.

migrated

Still in 1.14.4 Pre-Release 5, please Reopen.

violine1101

Please create a new ticket if the issue has not been fixed completely (and if we don't already have another ticket for it).

migrated

New Ticket MC-160250

violine1101

Thanks, I linked the ticket. I reset the description to the state of this ticket when it was resolved, in order to avoid confusion in the future.

migrated

migrated

Confirmed

Very Important

Mob behaviour, Village system

bed, bell, meeting-point, village, villager, workstations

Minecraft 1.14.1 Pre-Release 2, Minecraft 1.14.1, Minecraft 1.14.2 Pre-Release 1, Minecraft 1.14.2 Pre-Release 2, Minecraft 1.14.2 Pre-Release 3, ..., Minecraft 1.14.3 Pre-Release 4, Minecraft 1.14.3, Minecraft 1.14.4 Pre-Release 1, Minecraft 1.14.4 Pre-Release 3, Minecraft 1.14.4 Pre-Release 5

Minecraft 1.14.4 Pre-Release 2

Retrieved