Closed XfedeX closed 3 years ago
The problem is here:
const Movements = class Movements {
constructor (bot, mcData) {
this.bot = bot
this.canDig = false
this.digCost = 10
}}
That's not how you inherit from a class. This is how: https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Objects/Inheritance#Inheritance_with_class_syntax
Version of mineflayer-pathfinder: latest code:
error:
TypeError: movements.countScaffoldingItems is not a function at Object.bot.pathfinder.getPathTo (C:\Users\Toshiba\node_modules\mineflayer-pathfinder\index.js:56:97) at EventEmitter.monitorMovement (C:\Users\Toshiba\node_modules\mineflayer-pathfinder\index.js:259:42) at EventEmitter.emit (events.js:327:22) at Timeout.doPhysics [as _onTimeout] (C:\Users\Toshiba\node_modules\mineflayer\lib\plugins\physics.js:63:13) at listOnTimeout (internal/timers.js:554:17) at processTimers (internal/timers.js:497:7)