A Minecraft 1.8.9 Forge mod that recreates the functionality of the original Bedwars AFKv1 macro bot using Duck Dueller's advanced movement and looking framework.
- ✅ Bridge state synchronization - Fixed desynchronization between AdvancedPathfinder and EagleBridge
- ✅ Stuck recovery enhancements - Three-tier recovery system with successful jump detection
- ✅ Camera smoothing - Multiple interpolation speeds for natural movement (0.1f-0.25f)
- ✅ Large turn pause - Complete movement stop when turning >90°
- ✅ Bidirectional rotation - Intelligently chooses shortest rotation path
- ✅ Exit validation separation - Bridge exit logic separated from platform/safedrop checks
- ✅ Documentation consolidation - Reduced redundant docs, improved organization
See PATHFINDING_ARCHITECTURE_ANALYSIS.md for complete details. See PATHFINDING_GUIDE.md for user-facing features.
We're actively looking for contributors! Here are the priority features that need work:
- Fix pitch/yaw block placement accuracy - Bot sometimes misses the edge when bridging and falls off. Need more precise edge detection and crosshair positioning.
- Smooth pathfinding movement - Current movement can be jerky on complex paths. Implement better rotation interpolation and acceleration/deceleration.
- Fix Watchdog flag on bridging - Bot sends 35+ block placement packets to the same position, triggering anti-cheat. Implement placement cooldown and validation.
- Generator detection & tracking - Implement automatic generator position detection using pathfinding and save positions for resource collection optimization.
See the Contributing Guide for detailed instructions on getting started with Cursor AI!
Quick Start:
- Install Cursor
- Clone:
https://github.com/familiar/Bedwars-Bot-V3.git - Ask Cursor Agent: "Read PATHFINDING_GUIDE.md and help me work on [TASK]"
- Automatic Game Management: Joins bedwars games and handles full game lifecycle
- Smart Resource Collection: AFKs at generator while monitoring inventory
- Auto-Shopping: Automatically purchases items when enough resources collected
- Teammate Resource Sharing: Detects nearby teammates and drops resources
- Enemy Defense: Detects damage and activates defense mode (fireballs + golden apples)
- Respawn Handling: Automatically returns to generator after death
- Staff Detection: Immediately leaves games when staff members detected
- Failsafe Systems: Handles disconnects, limbo, errors, and edge cases
This mod recreates the exact behavior of the Bedwars AFKv1 macro bot:
- Detects game start via chat ("Protect your bed")
- Walks backward into generator (80 ticks)
- Saves generator coordinates
- Detects and logs teammates
- Starts idle AFK routine
- Alternates left (130ms) and right (130ms) key presses every 5 seconds
- Continuously monitors iron count in inventory
- Scans for nearby teammates (7 block radius)
- Monitors health for enemy detection
- Triggers when iron count ≥ 12
- Finds "ITEM SHOP" entity
- Navigates to shop using smooth rotation
- Purchases items via rapid clicking
- Returns to generator coordinates
- Activated when player takes damage
- Looks backward (180° + 80° pitch)
- Uses spawn eggs (fireballs)
- Rapidly consumes 35 golden apples
- Returns to idle state
All original chat triggers implemented:
- Game modes: Regular, Lucky Blocks, Swappage
- Death: Final elimination, bed broken
- Game end: Reward summary
- Respawn: Return to generator
- Staff: [YOUTUBE], [HELPER], [MOD], [ADMIN]
- Errors: Connection issues, limbo, timeouts
- Smooth, incremental rotation with speed limiting
- State-managed key controls
- Distance-based look speed scaling
- Randomization for human-like behavior
- Entity tracking with smooth rotation
- Fixed angle targeting
- Configurable rotation speeds (15° horizontal, 10° vertical)
- Random jitter (±0.5°) for natural appearance
- Forge event handlers for chat and world events
- State machine for game phases
- Timer-based routines for AFK movement
- Asynchronous task scheduling
- Build the mod:
./gradlew build - Place in
.minecraft/modsfolder - Launch Minecraft 1.8.9 with Forge
- Press
Rto toggle bot on/off - Bot automatically joins
/play bedwars_four_four
No configuration needed! The bot automatically detects your Minecraft username when you start it.
| Feature | Original (Macro) | This (Kotlin) |
|---|---|---|
| Looking | Instant angle snap | Smooth incremental rotation |
| Movement | Direct key commands | State-managed API |
| Timing | Tick-based (1t = 50ms) | Millisecond timers |
| Integration | External macro mod | Native Forge mod |
| Error Handling | Basic restarts | Comprehensive failsafes |
BedwarsAFK.kt (Main)
├── BedwarsBot.kt (Core Logic)
│ ├── State Machine (LOBBY → STARTING → IDLE → PURCHASING → etc.)
│ ├── Game Lifecycle Management
│ ├── Timer Management
│ └── Coordinate Navigation
├── ChatEventHandler.kt (Event Detection)
│ ├── Game Start/End
│ ├── Death/Respawn
│ ├── Staff Detection
│ └── Error Handling
└── Player Systems
├── Movement.kt (WASD + Sprint/Sneak)
├── Mouse.kt (Looking + Clicking)
├── Inventory.kt (Item Management)
└── LobbyMovement.kt (Pre-game behavior)
- Original Bot: Bedwars AFKv1 by Rice
- Framework: Duck Dueller movement system
- Implementation: AI-assisted Kotlin port
This bot is for educational purposes. Using automation on multiplayer servers may violate their terms of service.