fix(mover): 🚸 better messages
This commit is contained in:
parent
e74d796124
commit
4d21327086
|
@ -30,22 +30,22 @@ function initMoves(bot = bot, mcData = bot.mcData) {
|
||||||
|
|
||||||
function moveNear(pos, distance = 3) {
|
function moveNear(pos, distance = 3) {
|
||||||
const { GoalNear } = require('mineflayer-pathfinder').goals
|
const { GoalNear } = require('mineflayer-pathfinder').goals
|
||||||
cfg.quiet || bot.chat(`moving to ${pos}`)
|
|
||||||
|
|
||||||
pos = v(pos)
|
pos = v(pos)
|
||||||
|
cfg.quiet || bot.chat(`moving to ${pos.floored()}`)
|
||||||
bot.pathfinder.setMovements(movements.defaultMove)
|
bot.pathfinder.setMovements(movements.defaultMove)
|
||||||
bot.pathfinder.setGoal(new GoalNear(pos.x, pos.y, pos.z, distance))
|
bot.pathfinder.setGoal(new GoalNear(pos.x, pos.y, pos.z, distance))
|
||||||
}
|
}
|
||||||
|
|
||||||
function moveXZ(pos) {
|
function moveXZ(pos) {
|
||||||
const { GoalXZ } = require('mineflayer-pathfinder').goals
|
const { GoalXZ } = require('mineflayer-pathfinder').goals
|
||||||
cfg.quiet || bot.chat(`moving to ${pos}`)
|
|
||||||
|
|
||||||
if (Array.isArray(pos) && pos.length == 2) {
|
if (Array.isArray(pos) && pos.length == 2) {
|
||||||
pos = v(pos[0], 0, pos[1])
|
pos = v(pos[0], 0, pos[1])
|
||||||
}
|
}
|
||||||
pos = v(pos)
|
pos = v(pos)
|
||||||
console.log(pos)
|
console.log(pos)
|
||||||
|
cfg.quiet || bot.chat(`moving to ${pos.floored()}`)
|
||||||
bot.pathfinder.setMovements(movements.defaultMove)
|
bot.pathfinder.setMovements(movements.defaultMove)
|
||||||
bot.pathfinder.setGoal(new GoalXZ(pos.x, pos.z))
|
bot.pathfinder.setGoal(new GoalXZ(pos.x, pos.z))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user