Liberty's Villagers

Liberty's Villagers

623k Downloads

SUGGESTION: add some improvements to villagers' ai if possible

CyberSteve777 opened this issue ยท 11 comments

commented

Although the current one is quite good, I suggest to take a look at Sky villages mod. In some cases, villagers either can't find job or fall from height.

commented

Interesting that the villager decided to pathfind behind the furnace instead right in front. It looks like there's a one block gap between the wall and the furnace, and then another block for the wall.
As for the villager getting stuck - they think trapdoors are always closed, so the fact that it's "open" in that screenshot (as part of the flower box) means they get confused and think they can't jump up onto the flowers.
I will try to take a look and see if I can figure out a solution for why the villager didn't go in front of the furnace, but instead three blocks behind. The trap door one though will be much more complicated to fix.

That also happens on plains armorer house though. In addition to this, I think there should be an optional setting for villagers to avoid fences as well.

FYI: Villagers already avoid fences with the maximum penalty of -1 by default (see net.minecraft.entity.ai.pathing.PathNodeType).

commented

Ok so the person who made the skyvillages mod is being very cruel to the villagers.
There's a wall on top of the blast furnace. The villager thinks it is not possible to path there because of the wall. Trying to figure out a solution.

commented

Ok so the person who made the skyvillages mod is being very cruel to the villagers. There's a wall on top of the blast furnace. The villager thinks it is not possible to path there because of the wall. Trying to figure out a solution.

Check vanilla plains armorer house and look at blast furnace here. You'll see same. I hope it could be located with /locate poi ...

commented

On this photo, for ex., villager usually stuck at this position (at crosshair):
2022-11-04_19 45 14

but behind the wall is poi, which could be easily accessed
2022-11-04_19 48 11

commented

seed for testing: -4693931934510397662
mc: 1.19.2

commented

I'll look into this. I haven't dug too deeply into the part of the pathfinding code that determines obstacles, but I'll give it a go. I have noticed villagers having trouble with moving from bottom slabs to stairs.

commented

Interesting that the villager decided to pathfind behind the furnace instead right in front. It looks like there's a one block gap between the wall and the furnace, and then another block for the wall.

As for the villager getting stuck - they think trapdoors are always closed, so the fact that it's "open" in that screenshot (as part of the flower box) means they get confused and think they can't jump up onto the flowers.

I will try to take a look and see if I can figure out a solution for why the villager didn't go in front of the furnace, but instead three blocks behind. The trap door one though will be much more complicated to fix.

commented

Also, villagers are acting strange at this place
2022-11-06_12 29 55

commented

I noticed in my modded world that villagers have trouble with trapdoors blocking their way. They don't recognize it as an obstacle. There's probably more blocks that they have the same problem with.

commented

Interesting that the villager decided to pathfind behind the furnace instead right in front. It looks like there's a one block gap between the wall and the furnace, and then another block for the wall.

As for the villager getting stuck - they think trapdoors are always closed, so the fact that it's "open" in that screenshot (as part of the flower box) means they get confused and think they can't jump up onto the flowers.

I will try to take a look and see if I can figure out a solution for why the villager didn't go in front of the furnace, but instead three blocks behind. The trap door one though will be much more complicated to fix.

That also happens on plains armorer house though. In addition to this, I think there should be an optional setting for villagers to avoid fences as well.

commented

Fixed in version 1.0.2.

  • Added "Villager Stuck Fix" which uses fuzzy targeting to help the villager find a new path out when in difficult situations.
  • Made the minimum "completion" radius for a Point Of Interest customizable. Setting it to 3 helps villagers claim POI that are obscured by blocks on top of or beside it.

Tested on SkyVillage using the above seed, villagers were able to path off the trapdoor flowerbox and claim the armorer's furnaces.