Introduction
OneKeyMiner
Section titled “OneKeyMiner”
Chain Mining, Interaction & Planting - All in One!
✨ Features
Section titled “✨ Features”- ⛏️ Chain Mining - Break connected blocks of the same type at once
- ✂️ Chain Interaction - Batch shearing, hoeing, stripping, path making
- 🌱 Chain Planting - Auto-plant crops on adjacent farmland
- 🎮 Multi-Platform - Supports Fabric, NeoForge, and Forge
- ⚙️ Highly Configurable - Customize max blocks, distance, activation mode
- 🏷️ Tag Support - Use tags like
#minecraft:logs,#c:ores - 🛡️ Protection - Auto-stop when tool durability or hunger is low
- 🔌 API Available - Easy integration for other mods
📥 Installation
Section titled “📥 Installation”Requirements
Section titled “Requirements”| Component | Version |
|---|---|
| Minecraft | 1.21.9 |
| Java | 21+ |
| Fabric Loader | 0.15.0+ |
| NeoForge | 21.0+ |
| Forge | 59.0+ |
Download
Section titled “Download”Download the latest release from GitHub Releases.
Choose the correct version for your platform:
onekeyminer-fabric-x.x.x-1.21.9.jarfor Fabriconekeyminer-neoforge-x.x.x-1.21.9.jarfor NeoForgeonekeyminer-forge-x.x.x-1.21.9.jarfor Forgeonekeyminer-x.x.x-1.21.9.jarfor universal (auto-detect)
🎮 Quick Start
Section titled “🎮 Quick Start”Chain Mining
Section titled “Chain Mining”- Hold a pickaxe or axe
- Hold the activation key (default:
`backtick) - Break an ore or log
- Watch connected blocks break automatically!
Chain Interaction
Section titled “Chain Interaction”- Hold a hoe, axe, shovel, or shears
- Hold the activation key
- Right-click to interact with blocks
- Adjacent interactable blocks are also processed!
Chain Planting
Section titled “Chain Planting”- Hold seeds or crops
- Hold the activation key
- Right-click on farmland
- Adjacent empty farmland is planted automatically!
⚙️ Configuration
Section titled “⚙️ Configuration”Configuration file location: config/onekeyminer.json
Key Settings
Section titled “Key Settings”| Option | Default | Description |
|---|---|---|
enabled | true | Enable/disable the mod |
maxBlocks | 64 | Maximum blocks per chain operation |
maxDistance | 16 | Maximum search distance |
allowDiagonal | true | Allow diagonal block connections |
consumeDurability | true | Consume tool durability |
preserveDurability | 1 | Stop when durability reaches this value |
consumeHunger | true | Consume hunger for each block |
minHungerLevel | 1 | Stop when hunger reaches this value |
allowBareHand | true | Allow chain mining without tools |
teleportDrops | false | Teleport drops to player inventory |
teleportExp | false | Teleport experience to player |
Block/Tool Lists
Section titled “Block/Tool Lists”{ "customWhitelist": ["mymod:custom_ore"], "blacklist": ["minecraft:bedrock"], "toolWhitelist": [], "toolBlacklist": ["minecraft:wooden_pickaxe"]}🔧 For Developers
Section titled “🔧 For Developers”OneKeyMiner provides a comprehensive API for mod developers.
Adding Dependency
Section titled “Adding Dependency”// FabricmodImplementation "org.xiyu:onekeyminer-fabric:2.0.0"
// NeoForge/Forgeimplementation "org.xiyu:onekeyminer-neoforge:2.0.0"Basic API Usage
Section titled “Basic API Usage”import org.xiyu.onekeyminer.api.OneKeyMinerAPI;
// Register custom blocksOneKeyMinerAPI.registerBlock("mymod:custom_ore");OneKeyMinerAPI.registerBlockTag("#mymod:ores");
// Register custom toolsOneKeyMinerAPI.registerTool("mymod:super_pickaxe");
// Listen to eventsChainEvents.registerPreActionListener(event -> { // Custom logic before chain operation});See API Documentation for complete API reference.
🌟 Addon Development
Section titled “🌟 Addon Development”Want to add preview highlighting or other features? You can create addon mods using our API!
Example: Block Preview Renderer
Section titled “Example: Block Preview Renderer”Check out LiteMiner’s BlockHighlightRenderer for reference on implementing block preview highlighting.
📋 Compatibility
Section titled “📋 Compatibility”Supported Mod Loaders
Section titled “Supported Mod Loaders”- ✅ Fabric (with Fabric API)
- ✅ NeoForge
- ✅ Forge
Tested Mods
Section titled “Tested Mods”- Mod Menu (Fabric)
- Most ore/tool mods
Protection Plugin Support
Section titled “Protection Plugin Support”Uses ServerPlayerGameMode#destroyBlock() for proper integration with:
- FTB Chunks
- Claim plugins
- Other protection mods
🐛 Issues & Contributions
Section titled “🐛 Issues & Contributions”Found a bug or have a suggestion?
📜 License
Section titled “📜 License”This project is licensed under All Rights Reserved (ARR). You may not copy, modify, or distribute the code without permission from the author.
💖 Credits
Section titled “💖 Credits”- Author: Mai_xiyu
- Project Origin: The original OneKeyMiner had separate projects and branches for each mod loader and Minecraft version. This unified version was created to consolidate all platforms into a single codebase with completely refactored code.
- Special Thanks: All contributors and testers
Made with ❤️ for the Minecraft community