# Simple AutoTool Mod
A client-side Minecraft Fabric mod for version 1.21.4 that automatically switches to the best tool in your inventory when mining blocks.
## Features
- **Automatic Tool Switching**: Detects the block you're targeting and automatically selects the most effective tool from your hotbar
- **Smart Detection**: Recognizes different block types and matches them with appropriate tools:
- Pickaxe for stone, ores, and other hard blocks
- Axe for wood and wooden materials
- Shovel for dirt, sand, gravel, and similar blocks
- Hoe for farmland and plant-based blocks
- **Manual Override**: Hold Shift (sneak) to disable auto-switching and maintain manual control
- **Toggle Functionality**: Press `R` (configurable) to enable/disable the mod with on-screen feedback
- **Client-Side Only**: Works on any server without requiring server-side installation
- **Hotbar Only**: Only switches between tools in your hotbar (slots 0-8)
## Installation
**Download and Install**:
- Download the latest release from the releases page
- Place the `.jar` file in your `mods` folder
- Launch Minecraft with the Fabric profile
## Usage
1. **Install the mod** and launch Minecraft
2. **Join any world** (singleplayer or multiplayer)
3. **Look at a block** you want to mine
4. The mod will **automatically switch** to the best tool in your hotbar
5. **Hold Shift** to temporarily disable auto-switching
6. **Press G** to toggle the mod on/off (you'll see a chat message confirming the status)
## Configuration
- **Toggle Key**: The default key to toggle the mod is `G`. You can change this in Minecraft's Controls settings under the "AutoTool" category.
## How It Works
1. **Block Detection**: The mod continuously monitors what block you're looking at
2. **Tool Analysis**: It checks all items in your hotbar and calculates their mining efficiency for the target block
3. **Smart Switching**: It switches to the tool with the highest mining speed multiplier
4. **Respect Player Intent**: It won't switch when you're sneaking, allowing for manual control
## Compatibility
- **Minecraft Version**: 1.21.4
- **Mod Loader**: Fabric
- **Side**: Client-side only
- **Server Compatibility**: Works on any server (Vanilla, Fabric, Paper, etc.)
- **Other Mods**: Should be compatible with most other mods
## Technical Details
- **Language**: Java 21
- **Framework**: Fabric API
- **Architecture**: Event-driven with client tick events
- **Performance**: Lightweight with minimal performance impact
## Troubleshooting
**Mod not working?**
- Ensure you have Fabric Loader and Fabric API installed
- Check that you're using Minecraft 1.21.4
- Verify the mod is enabled (press G to toggle)
**Tools not switching?**
- Make sure you're not sneaking (holding Shift)
- Ensure the correct tool is in your hotbar (slots 0-8)
- Check that you're looking directly at a block
**Performance issues?**
- The mod is designed to be lightweight, but if you experience issues, try toggling it off temporarily
## License
This project is licensed under the MIT License.
**Note**: This mod is client-side only and does not require installation on servers. It works by automatically switching your selected hotbar slot based on the block you're targeting.