diff options
author | Baitinq <manuelpalenzuelamerino@gmail.com> | 2023-02-15 19:30:09 +0100 |
---|---|---|
committer | Baitinq <manuelpalenzuelamerino@gmail.com> | 2023-02-15 19:30:09 +0100 |
commit | 10fb737a45e6f9c9fea4b520068e5fde33ddaaf4 (patch) | |
tree | df961fea4e21fd1fe2976bfc5acfa456f1b512d0 /src/main.ts | |
parent | Bot: Add autoArmor plugin (diff) | |
download | 2bored2walk-10fb737a45e6f9c9fea4b520068e5fde33ddaaf4.tar.gz 2bored2walk-10fb737a45e6f9c9fea4b520068e5fde33ddaaf4.tar.bz2 2bored2walk-10fb737a45e6f9c9fea4b520068e5fde33ddaaf4.zip |
Bot: Add autoTotem plugin
Diffstat (limited to 'src/main.ts')
-rw-r--r-- | src/main.ts | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main.ts b/src/main.ts index 0a28ea4..8e87abc 100644 --- a/src/main.ts +++ b/src/main.ts @@ -3,6 +3,7 @@ import mineflayer from 'mineflayer'; import { ChannelType, Client, GatewayIntentBits } from "discord.js"; const mineflayerViewer = require('prismarine-viewer').mineflayer const antiHunger = require('mineflayer-antihunger').plugin +const autoTotem = require('mineflayer-auto-totem').autototem import { pathfinder, Movements, goals } from 'mineflayer-pathfinder'; import { plugin as autoeat } from 'mineflayer-auto-eat'; import autoArmor from '@nxg-org/mineflayer-auto-armor'; @@ -52,6 +53,7 @@ bot.loadPlugin(pathfinder) bot.loadPlugin(autoeat) bot.loadPlugin(antiHunger) bot.loadPlugin(autoArmor) +bot.loadPlugin(autoTotem) bot.once('spawn', () => { mineflayerViewer(bot, { firstPerson: true, port: 3000 }); @@ -85,6 +87,10 @@ bot.on('health', () => { quit(`low hp: ${bot.health}`) }) +bot.on("physicsTick", async () => { + (bot as any).autototem.equip() +}) + setInterval(() => { if (bot._client.state !== "play") return |