PrismarineJS / mineflayer-pathfinder

Pathfinding plugin that gives bot the ability to go from A to B
MIT License
221 stars 67 forks source link

Crashes on die: blockLand.position.y TypeError: Cannot read property 'y' of undefined #98

Closed SinanAkkoyun closed 3 years ago

SinanAkkoyun commented 3 years ago

The bot crashes when dying after the latest update on 1.16.4

/mineflayer-pathfinder/lib/movements.js:233
    while (blockLand.position.y > 0) {
                              ^

TypeError: Cannot read property 'y' of undefined
    at Movements.getLandingBlock (/mnt/c/Users/Sinan/node_modules/mineflayer-pathfinder/lib/movements.js:233:31)
    at Movements.getMoveDropDown (/mnt/c/Users/Sinan/node_modules/mineflayer-pathfinder/lib/movements.js:254:28)
    at Movements.getNeighbors (/mnt/c/Users/Sinan/node_modules/mineflayer-pathfinder/lib/movements.js:381:12)
    at AStar.compute (/mnt/c/Users/Sinan/node_modules/mineflayer-pathfinder/lib/astar.js:79:40)
    at Object.bot.pathfinder.getPathTo (/mnt/c/Users/Sinan/node_modules/mineflayer-pathfinder/index.js:60:33)
    at EventEmitter.monitorMovement (/mnt/c/Users/Sinan/node_modules/mineflayer-pathfinder/index.js:271:42)
    at EventEmitter.emit (events.js:327:22)
    at Timeout.doPhysics [as _onTimeout] (/mnt/c/Users/Sinan/node_modules/mineflayer/lib/plugins/physics.js:63:13)
    at listOnTimeout (internal/timers.js:554:17)
    at processTimers (internal/timers.js:497:7)
Karang commented 3 years ago

Thanks for the report, should be fixed in 1.3.1

SinanAkkoyun commented 3 years ago

Works I think!