Skip to content

Mai-xiyu/OneKeyMiner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

43 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

OneKeyMiner

OneKeyMiner Logo

Chain Mining, Interaction & Planting - All in One!

Release License Minecraft Version Java Version

:OneKeyMiner

๐Ÿ‡จ๐Ÿ‡ณ ไธญๆ–‡ๆ–‡ๆกฃ | ๐Ÿ“– User Guide | ๐Ÿ”ง API Documentation


โœจ 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

Requirements

Component Version
Minecraft 1.21.9
Java 21+
Fabric Loader 0.15.0+
NeoForge 21.0+
Forge 59.0+

Download

Download the latest release from GitHub Releases.

Choose the correct version for your platform:

  • onekeyminer-fabric-x.x.x-1.21.9.jar for Fabric
  • onekeyminer-neoforge-x.x.x-1.21.9.jar for NeoForge
  • onekeyminer-forge-x.x.x-1.21.9.jar for Forge
  • onekeyminer-x.x.x-1.21.9.jar for universal (auto-detect)

๐ŸŽฎ Quick Start

Chain Mining

  1. Hold a pickaxe or axe
  2. Hold the activation key (default: ` backtick)
  3. Break an ore or log
  4. Watch connected blocks break automatically!

Chain Interaction

  1. Hold a hoe, axe, shovel, or shears
  2. Hold the activation key
  3. Right-click to interact with blocks
  4. Adjacent interactable blocks are also processed!

Chain Planting

  1. Hold seeds or crops
  2. Hold the activation key
  3. Right-click on farmland
  4. Adjacent empty farmland is planted automatically!

โš™๏ธ Configuration

Configuration file location: config/onekeyminer.json

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

{
  "customWhitelist": ["mymod:custom_ore"],
  "blacklist": ["minecraft:bedrock"],
  "toolWhitelist": [],
  "toolBlacklist": ["minecraft:wooden_pickaxe"]
}

๐Ÿ”ง For Developers

OneKeyMiner provides a comprehensive API for mod developers.

Adding Dependency

// Fabric
modImplementation "org.xiyu:onekeyminer-fabric:2.0.0"

// NeoForge/Forge
implementation "org.xiyu:onekeyminer-neoforge:2.0.0"

Basic API Usage

import org.xiyu.onekeyminer.api.OneKeyMinerAPI;

// Register custom blocks
OneKeyMinerAPI.registerBlock("mymod:custom_ore");
OneKeyMinerAPI.registerBlockTag("#mymod:ores");

// Register custom tools
OneKeyMinerAPI.registerTool("mymod:super_pickaxe");

// Listen to events
ChainEvents.registerPreActionListener(event -> {
    // Custom logic before chain operation
});

See API Documentation for complete API reference.


๐ŸŒŸ Addon Development

Want to build addon mods or integrations? You can use our API to register blocks/tools and listen to chain events.


๐Ÿ“‹ Compatibility

Supported Mod Loaders

  • โœ… Fabric (with Fabric API)
  • โœ… NeoForge
  • โœ… Forge

Tested Mods

  • Mod Menu (Fabric)
  • Most ore/tool mods

Protection Plugin Support

Uses ServerPlayerGameMode#destroyBlock() for proper integration with:

  • FTB Chunks
  • Claim plugins
  • Other protection mods

๐ŸŒฟ Branching & Releases

  • Branching: Each Minecraft version uses its own branch (e.g., 1.21.9).
  • Latest: The latest Minecraft version is maintained on master.
  • Tag format: <branch>-<mod_version> (example: 1.21.9-1.6.0).

๐Ÿ› Issues & Contributions

Found a bug or have a suggestion?


๐Ÿ“œ 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

  • 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

About

OneKeyMiner Mod

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages