Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pathfinding stalls at a mob fence does not try reroute #42

Open
revell1 opened this issue Jun 15, 2023 · 2 comments
Open

Pathfinding stalls at a mob fence does not try reroute #42

revell1 opened this issue Jun 15, 2023 · 2 comments
Labels
bug movement for issues related to pathfinding or movement

Comments

@revell1
Copy link

revell1 commented Jun 15, 2023

"Description"
When a villager is following a path, if it is blocked by a mob fence, then the villager will get to the fence then get stuck repeatedly jumping at the fence.

To Reproduce
Create a MOB FENCE and a villager of type "plant_collector"
Place some plant on both sides of the MOB FENCE.
Activate the villager.

Expected behavior
Villager should collect plants on their side of the MOB FENCE,
then when no more plants on their side of fence, villager should walk round fence, and not try jumping over the MOB FENCE.

Screenshots
N/A

Log
N/A

Desktop (please complete the following information):

  • Minetest version: 5.7.0
  • Other mods activated: Using Mesecraft latest release (no version info)
@sfence
Copy link
Collaborator

sfence commented Jun 15, 2023

Thanks for reporting.

Pathfinder is probably the weakest part of this mod.

lmaddox pushed a commit to InnovAnon-Inc/working_villages that referenced this issue Dec 3, 2023
@lmaddox
Copy link

lmaddox commented Dec 3, 2023

we can tell the path finding algorithm that mobs:fences have infinite height, basically.

local function get_neighbor_ground_level(pos, jump_height, fall_height)
        local node = minetest.get_node(pos)
        local height = 0
        if string.find(node.name, "mobs:fence") then -- #42
                return nil
        end

Screenshot_2023-12-02_22_54_04
Screenshot_2023-12-02_22_54_14

lmaddox pushed a commit to InnovAnon-Inc/working_villages that referenced this issue Dec 3, 2023
@theFox6 theFox6 added the movement for issues related to pathfinding or movement label Dec 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug movement for issues related to pathfinding or movement
Projects
None yet
Development

No branches or pull requests

4 participants