A modular Mineflayer bot for offline-mode servers with:
follow me,come,afk,stop- default mode is patrol when no other task is active
- manual farming (
farm) - continuous farming (
autofarm on/autofarm off) - optional automatic night sleeping (
autosleep on/autosleep off) - reactive retaliation mode (only attacks hostile mobs that directly damage the bot, then resumes prior task)
- Discord webhook activity reports (join/leave events and online-player list command)
- mature crop harvesting for wheat, carrots, potatoes
- position-based same-crop replanting
- chest deposit automation with seed reserves
- auto-eat support while farming
- reconnect on disconnect
- Copy env template:
Copy-Item .env.example .env
- Edit
.envvalues as needed (minimal: BOT_USERNAME, MINECRAFT_AUTH, MINECRAFT_SERVER). - Start bot:
npm start
- Optional production build:
npm run build
- Local TypeScript dev mode:
npm run dev
Default username and label are set to TigerBaby.
The env template already includes:
MINECRAFT_SERVER=serveraddress:portMINECRAFT_AUTH=offlineCOMMAND_PREFIX=botDEPOSIT_POINT=-106,52,124GEAR_CHEST_POSITION=-91,64,134AUTOFARM_ON_START=falseDISCORD_WEBHOOK_URL=
Every command must include the prefix. Without it, bots ignore the message.
Example: b1 come, b2 afk, bot help.
<prefix> follow me<prefix> come<prefix> afk<prefix> stop<prefix> sleep<prefix> farm<prefix> autofarm on<prefix> autofarm off<prefix> autosleep on<prefix> autosleep off<prefix> discord players<prefix> help
sleep and autosleep use the current configured spawn bed and resume the previous activity after wake-up.
Spawn bed config options:
- set defaults in env:
SPAWN_BED_X,SPAWN_BED_Y,SPAWN_BED_Z - or run
setspawnpointwhile standing on a bed to update the in-memory spawn bed for the current run (the bot prints the bed coordinates)
Storage deposit config:
DEPOSIT_POINTsets the storage hall anchor for all deposits (x,y,z)- bot scans chests only within the configured storage radius around that point