https://github.com/pandapip1/mineflayer-swarm
Allows you to control an entire PrismarineJS/mineflayer bot swarm with minimal additional code
https://github.com/pandapip1/mineflayer-swarm
maintainer-wanted
Last synced: 6 months ago
JSON representation
Allows you to control an entire PrismarineJS/mineflayer bot swarm with minimal additional code
- Host: GitHub
- URL: https://github.com/pandapip1/mineflayer-swarm
- Owner: Pandapip1
- License: mit
- Created: 2021-11-05T11:45:34.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2025-04-09T19:12:38.000Z (6 months ago)
- Last Synced: 2025-04-09T20:24:29.320Z (6 months ago)
- Language: TypeScript
- Homepage:
- Size: 221 KB
- Stars: 25
- Watchers: 3
- Forks: 7
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# mineflayer-swarm
[](http://npmjs.com/package/mineflayer-swarm)
[](https://github.com/Pandapip1/mineflayer-swarm/actions?query=workflow%3A%22CI%22)
[](https://gitpod.io/#https://github.com/Pandapip1/mineflayer-swarm)***Looking for maintainers. I have lost interest in this project and it is currently broken.***
Allows you to control an entire [`mineflayer`](https://github.com/PrismarineJS/mineflayer) bot swarm with minimal additional code. The API isn't final, so minor versions might introduce breaking changes. Here be dragons!
## Moving from a single bot to a swarm
It's easier than you'd think!
Example bot using `mineflayer`:
```ts
import { createBot, Bot } from 'mineflayer'const bot: Bot = createBot({
username: 'email0@example.com',
password: 'P@ssword0!',
host: 'localhost',
port: 25565
})bot.on('chat', function (username, message) {
if (username === bot.username) return
bot.chat(message)
})
```Example bot using `mineflayer-swarm`:
```ts
import { createSwarm, Swarm } from 'mineflayer'const swarm: Swarm = mineflayerSwarm.createSwarm({
host: 'localhost',
port: 25565
}, require('auth.json'))swarm.on('chat', function (bot, username, message) {
if (swarm.isSwarmMember(username)) return
bot.chat(message)
})
```