example
Rosegold Bot Example
A template repository for creating Minecraft bots using Rosegold.cr.
This example demonstrates a simple attack bot that connects to a Minecraft server and performs basic combat actions.
Quick Start
Option 1: Download Pre-built Binary
- Download the latest build from the Actions tab - look for the latest "Build" workflow
- Extract the archive and run:
./bin/attack
(Linux) orbin/attack.exe
(Windows)
Option 2: Build from Source
-
Use this template by clicking the "Use this template" button on GitHub
-
Clone your new repository:
git clone https://github.com/yourusername/your-bot-name.git cd your-bot-name
-
Install dependencies:
shards install
-
Configure your bot by editing
src/attack.cr
:- Change
"play.civmc.net"
to your server address - Customize the weapon selection (currently uses
"diamond_sword"
)
- Change
-
Build and run:
shards build ./bin/attack
What This Bot Does
The example bot:
- Connects to your specified Minecraft server
- Automatically eats food when hungry
- Selects a diamond sword from inventory
- Attacks every 5 game ticks (4 attacks per second)
- Displays current position and tool durability
Development
Building
shards build
Testing
crystal spec
Formatting
crystal tool format
Creating Your Own Bot
This template provides a foundation for building Minecraft bots with Rosegold.cr. You can:
- Modify the existing attack bot for different combat strategies
- Create new bot types by adding additional target files in
shard.yml
- Add more complex behaviors using Rosegold's API
See the Rosegold.cr documentation for available features and APIs.
License
MIT License - see LICENSE for details.
Disclaimer
This software is for educational purposes. Ensure you comply with your server's rules and Minecraft's Terms of Service when using bots.
example
- 0
- 0
- 0
- 0
- 1
- 7 days ago
- September 24, 2025
MIT License
Wed, 01 Oct 2025 06:10:42 GMT