Compare commits

..

No commits in common. "6b71de03562dec7281cd94dc78c88f9b0b87bc69" and "8e719d5ccf42d95e28290a0cca2d87660814e36a" have entirely different histories.

3 changed files with 7 additions and 17 deletions

View File

@ -196,14 +196,7 @@ function command(username, message) {
subcommand("go follow " + message_parts.slice(2).join(" "))
break;
case "come":
switch (message_parts[1]) {
case "close":
case "closer":
subcommand("go follow close")
break
default:
subcommand("go follow once")
}
subcommand("go follow once")
break;
case "move":
case "go":
@ -259,14 +252,11 @@ function command(username, message) {
cfg.plugins.mover.follow(bot.nearestEntity())
break
case 1:
let dist = 3
switch (message_parts2[0]) {
case "close":
dist = 1
case "me":
case "once":
if (player) {
cfg.plugins.mover.follow(player, message_parts2[0] === "me", dist)
cfg.plugins.mover.follow(player, message_parts2[0] !== "once")
} else {
cfg.quiet || bot.chat("can't see you")
}

View File

@ -2,10 +2,10 @@ let cfg
let bot
let mcData
function block() {
function info() {
const block = bot.blockAtCursor()
console.log(block)
cfg.quiet || bot.chat([block.type, block.name].join(": "))
cfg.quiet || bot.chat([block.id, block.name])
}
const load = (config) => {
@ -19,4 +19,4 @@ const load = (config) => {
const unload = () => {}
module.exports = { load, unload, block }
module.exports = { load, unload, info }

View File

@ -37,7 +37,7 @@ function moveNear(pos, distance = 3) {
bot.pathfinder.setGoal(new GoalNear(pos.x, pos.y, pos.z, distance))
}
function follow(entity, dynamic = true, distance = 3) {
function follow(entity, dynamic = true) {
console.assert(entity)
const { GoalFollow } = require('mineflayer-pathfinder').goals
@ -53,7 +53,7 @@ function follow(entity, dynamic = true, distance = 3) {
// console.log(entity)
bot.pathfinder.setMovements(movements.defaultMove)
bot.pathfinder.setGoal(new GoalFollow(entity, distance), dynamic)
bot.pathfinder.setGoal(new GoalFollow(entity, 3), dynamic)
}
function hit(blockOrEntity) {