Compare commits
No commits in common. "afd2e002dfa03feef2455dcdbaf7409d361ccde9" and "f50e388c398d404396d8b997e93b80015b7b6436" have entirely different histories.
afd2e002df
...
f50e388c39
|
@ -47,9 +47,7 @@ function unloadplugin(pluginname, pluginpath) {
|
|||
const plugin = require.resolve(pluginpath)
|
||||
try {
|
||||
if (plugin && require.cache[plugin]) {
|
||||
// `unload()` isn't exported sometimes,
|
||||
// when plugin isn't properly loaded
|
||||
require.cache[plugin].exports?.unload?.()
|
||||
require.cache[plugin].exports.unload()
|
||||
delete plugins[pluginname]
|
||||
delete require.cache[plugin]
|
||||
}
|
||||
|
|
|
@ -23,19 +23,6 @@ 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)
|
||||
}
|
||||
|
||||
|
@ -156,7 +143,7 @@ function away(entity = bot.nearestEntity(), invertInvert = true, dynamic = true,
|
|||
|
||||
function ride(entity) {
|
||||
entity = entity?.entity || entity
|
||||
const ridableMobs = ["Horse", "Donkey", "Pig", "Strider", "Mule"]
|
||||
const ridableMobs = ["Horse", "Donkey", "Pig", "Strider"]
|
||||
const vehicle = entity && typeof entity !== "string" ? entity : bot.nearestEntity(e => {
|
||||
if (typeof entity === "string") return e.name === entity
|
||||
const maybeRidableMob = e.mobType?.split(" ")
|
||||
|
@ -327,7 +314,7 @@ function command(message_parts, player) {
|
|||
case "up":
|
||||
case "u":
|
||||
case "j":
|
||||
moveOrRide(1, 1, "jump", message_parts2)
|
||||
moveOrRide(1, 1, "left", message_parts2)
|
||||
break
|
||||
case "back":
|
||||
case "forward":
|
||||
|
|
Loading…
Reference in New Issue
Block a user