MCA Reborn [Fabric/Forge]

MCA Reborn [Fabric/Forge]

6M Downloads

Villagers gather in odd places: I Found a Reason

Mewcenary opened this issue ยท 4 comments

commented

It seems they can't path right to find the doors to locate beds. The MCA's congregate in inaccessible locations to find beds. I.E, they try to go through the ground or objects to reach a bed. Per the screenshot, they are standing above an underground chamber I built with beds for them to sleep in. No amount of leading or nudging them gets them to the beds. After commanding them to follow me to a bed and I tell them to move freely, they leave and go right back to the surface and stand over the location of the beds. There are also beds in normal houses, but they don't notice or use them. In random villages, If one finds a bed, sometimes they just stand on it and don't sleep.

Java: 8 - 331 (build 1.8.0_331-b09)
Forge: 1.16.5-forge-36.2.35 (same issue with other installer version 1.16.5-forge-36.2.26/27/33)
minecraft-comes-alive-7.0.11-forge.jar Apr 16, 2022

2022-05-11_16 43 36

commented

The beds AI will be changed back to vanilla soon, this should fix that. The issue is that the path is too long, so they try to be "smart" and walk one part of the path at the time. Which is not always correct.

commented

Any updates?

commented

@Luke100000 Verify for 7.3.9

commented

Fixing this properly is tricky.
Not verified but the issue is that the pathfinder has a limited range.
Let's say its 10 blocks. Now imagine the bed is 20 away. The pathfinder cant reach it, so instead it just takes the closest block and continue from there. The closest block however could be a local minimum, a dead end.

Now to fix that we could just increase the range. Thats laggy. Or we could give up if too far away. Which cause them to get stuck until they randomly find back home.

The proper way I can imagine is a memory, where villagers remember blocks from where they cant find home. But blocks are too small, would take an eternity until they learn all dead ends. And they also need to recheck locations once a while. Etc etc so its not easy to implemenbt without adding more bugs.

The easier way is to give up temporarily. Like "welp, can't reach my bed, no bed time for today". But adding that to every single AI task would be pain too.