question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Pathfinding on chests

See original GitHub issue

Bot sometimes gets stuck pathfinding on chests. After hitting the bot in the right direction it fires the goal_reached event and completes.

goal_updated
path_update {
  status: 'success',
  cost: 1,
  time: 0.1872999998740852,
  visitedNodes: 1,
  generatedNodes: 5,
  path: [
    Move {
      x: -7855.515625,
      y: 65.875,
      z: 21658.5,
      remainingBlocks: 0,
      cost: 1,
      toBreak: [],
      toPlace: [],
      parkour: false,
      hash: '-7856,66,21658'
    }
  ],
  context: AStar {
    startTime: 138876.9816999999,
    movements: Movements {
      bot: [EventEmitter],
      canDig: false,
      digCost: 1,
      placeCost: 1,
      liquidCost: 1,
      dontCreateFlow: true,
      allow1by1towers: true,
      allowFreeMotion: false,
      allowParkour: true,
      allowSprinting: true,
      blocksCantBreak: [Set],
      blocksToAvoid: [Set],
      liquids: [Set],
      climbables: [Set],
      replaceables: [Set],
      scafoldingBlocks: [Array],
      fences: [Set],
      carpets: [Set],
      maxDropDown: 4
    },
    goal: GoalNear { x: -7854, y: 67, z: 21655, rangeSq: 16 },
    timeout: 5000,
    tickTimeout: 40,
    closedDataSet: Set(1) { '-7856,66,21659' },
    openHeap: BinaryHeapOpenSet { heap: [Array] },
    openDataMap: Map(5) {
      '-7857,67,21659' => [PathNode],
      '-7856,66,21658' => [PathNode],
      '-7856,66,21660' => [PathNode],
      '-7857,66,21658' => [PathNode],
      '-7857,66,21660' => [PathNode]
    },
    bestNode: PathNode {
      data: [Move],
      g: 1,
      h: 4.82842712474619,
      f: 5.82842712474619,
      parent: [PathNode]
    },
    maxCost: -1,
    visitedChunks: Set(1) { '-491,1353' }
  }
}
<=== Infinitely stuck here
goal_reached <== after hitting the bot manually, increasing the Y value

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
TRCYXcommented, May 27, 2022

Seems that the bug is really old. The position was floored upon the check was added.

1reaction
TRCYXcommented, May 27, 2022

This happens most of the time in my nether wart farm 😦 The bot just gets stuck, no event emits since part of it thinks it reaches the goal while another part thinks it does not.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[MCPE-46811] Villagers get stuck on chests - Jira - Mojang
I got a few places where the villagers walk on top of a chest and can't get out ... MCPE-45560 AI pathfinding gets...
Read more >
Computercraft: Path Finding : r/feedthebeast - Reddit
Make a storage system? A large array of chests in a room, with item locations stored as coordinates. The A* algorithm is used...
Read more >
PrismarineJS/mineflayer-pathfinder - GitHub
Pathfinding plugin for the Minecraft Bot API Mineflayer. Create static, dynamic or composite goals to navigate Minecraft terrain fully autonomously.
Read more >
Has anyone figured out a detailed understanding of NPCs' AI?
Anyone know how the pathfinding works? Please quantify and articulate how I am wrong. I know I can be wrong about anything. Just...
Read more >
Pathfinding Cookbook - Second Life Wiki
Treasure chest with legs. Sleeps, but runs and hides if anyone approaches. Fairy. Wanders about (flying) looking for flowers, lingers by flowers ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found