feat(mover): add new pathfinder Movements

- safeMove without parkour
- aggresiveMove that digs
This commit is contained in:
jay 2021-04-19 13:34:22 +05:00
parent 3c5ec6b360
commit afd2e002df

View File

@ -23,6 +23,19 @@ function initMoves(bot = bot, mcData = bot.mcData) {
movements.push(normalMove)
movements.defaultMove = movements[0]
const aggresiveMove = new Movements(bot, mcData)
//Object.create or assign?
Object.assign(aggresiveMove, normalMove)
aggresiveMove.canDig = true
movements.push(aggresiveMove)
const safeMove = new Movements(bot, mcData)
Object.assign(safeMove, normalMove)
safeMove.allowParkour = false
safeMove.canDig = false
movements.push(safeMove)
// console.info("go init: moves:", movements)
bot.pathfinder.setMovements(normalMove)
}