-
Bug
-
Resolution: Duplicate
-
None
-
1.16.40 Hotfix
-
None
-
Unconfirmed
-
Windows
I have seen mobs (especially passive - cow, sheep) and villagers stuck on many places, usually doors, fences, walls and corners, and when I walked across my bridge with walls and torches, it just clicked (in my mind):
Here you can see me (as a player) stuck on wall with a torch, because I am looking right, towards the wall and "hit" the altered wall having a torch on top of it. I don't know your path-finding code (A* or something similar but simplified?), but suppose it does not work with such fine grid to navigate around these obstacles and therefore get stuck on such places (and on doors, which make the corridor smaller), because any such simplified path-finding algorithm does not count with hit-boxes, but with some nodes in a graph that works in less-fine grid (am I right about your algorithm? just guessing here).
So, I am proposing to solve it with some force - giving entities (mobs, villagers AND player) some push at these situations - wall with a torch (or connection), stand alone fence (villagers and passive mobs get stuck at these a lot - when you have lighting on top of these) etc. Just make us all (I mean player, villagers, mobs, ...) move past these - by allowing us to move along (not through in case of walls and fences) and pushing us away from the increased hitbox (when moving from wall to a connected wall / wall with a torch etc.). Similar thing happens with doors. The hitbox of doors is actually pretty anyoing (for a player) and also blocks passive mobs like cow and sheep, sometimes even double-door is not enought to let two passive mobs in, both get stuck, none can go around the door and both fight for the double-door (and its reduced corridor-width). This would probably need either some randomness (in the push) or side-preference (like by north vs. south and west vs. east = positive/negative coords).
Just and idea, I may be totally wrong
- duplicates
-
MCPE-46805 Mobs Fail To Pathfind Through/Past multiple blocks
- Resolved