A Minecraft hacked client built in Rust, utilizing JNI (Java Native Interface) for seamless integration with Minecraft's Java runtime. DarkClient provides a robust architecture for developing game modifications through dynamic library injection.
- ๐ง Dynamic Library Injection: Hot-swappable module system without requiring game restarts
- ๐จ Cross-Platform GUI: Beautiful injector interface built with egui
- โจ๏ธ Real-time Input Handling: Advanced keyboard event processing for module toggling
- ๐บ๏ธ Smart Mapping System: Automatic obfuscation handling through JSON-based mappings
- ๐ Module Architecture: Extensible module system for easy feature development
- ๐ Comprehensive Logging: Detailed logging system for debugging and monitoring
- ๐ Thread-Safe Design: Robust multi-threaded architecture with proper synchronization
The project is organized into three main components:
A user-friendly GUI application that handles:
- Process detection (finding Minecraft instances)
- Library injection into target processes
- Status monitoring and error reporting
A JVMTI agent that provides:
- Dynamic library loading capabilities
- TCP command server for hot-reloading
- Process lifecycle management
- Cross-platform injection support
The core modification framework featuring:
- JNI integration with Minecraft's runtime
- Module system for game modifications
- Mapping system for obfuscation handling
- Input processing and event management
- Rust 1.87.0+ with Cargo package manager
- Java Development Kit (JDK) 21+
- Minecraft Java Edition
bash git clone https://github.com/TheDarkSword/DarkClient
cd darkclient
cargo build --release
The framework uses obfuscation mappings to interact with Minecraft:
python conversion.py
- Launch the Injector:
cd target/release ./injector
Warning
libagent_loader
and libclient
must be in the same directory where you run the injector.
-
Start Minecraft and load into a world
-
In the Injector GUI:
- Click "Find" to detect the Minecraft process
- Click "Inject" to load the modification framework
- Use Modules:
- Modules can be toggled using their assigned keybinds
- Check the log files for module status and debugging info
Create new modules by implementing the Module
trait:
use crate::module::{Module, ModuleData};
pub struct CustomModule {
data: ModuleData,
// Your module-specific fields
}
impl Module for CustomModule {
fn get_module_data(&self) -> &ModuleData {
&self.data
}
fn get_module_data_mut(&mut self) -> &mut ModuleData {
&mut self.data
}
fn on_start(&self) {
// Called when module is enabled
}
fn on_stop(&self) {
// Called when module is disabled
}
fn on_tick(&self) {
// Called every game tick while enabled
}
}
DarkClient/
โโโ ๐ client/ # Core modification library
โ โโโ ๐ src/
โ โ โโโ ๐ lib.rs # Main library entry point
โ โ โโโ ๐ client.rs # DarkClient core & JVM integration
โ โ โโโ ๐ mapping/ # Minecraft mapping system
โ โ โโโ ๐ module/ # Module framework
โโโ ๐ injector/ # GUI injection tool
โ โโโ ๐ src/
โ โโโ ๐ main.rs # Injector application
โโโ ๐ agent_loader/ # JVMTI agent for dynamic loading
โโโ ๐ mappings.json # Minecraft obfuscation mappings
โโโ ๐ conversion.py # Mapping conversion utility
โโโ ๐ Cargo.toml # Workspace configuration
Logs are written to:
-
- Injector application logs
app.log
is located where injector is executed
- Injector application logs
-
- Client library logs
dark_client.log
is located in .minecraft
- Client library logs
The agent loader uses TCP port 7878
for communication. This can be modified in : platform/mod.rs
pub const SOCKET_ADDRESS: SocketAddr = SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 7878);
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-module
) - Commit your changes (
git commit -am 'Add amazing module'
) - Push to the branch (
git push origin feature/amazing-module
) - Create a Pull Request
- Follow Rust best practices and use
cargo fmt
- Add comprehensive documentation for new modules
- Include proper error handling and logging
This project is intended for educational and research purposes. Users are responsible for complying with:
- Minecraft's Terms of Service
- Mojang's Commercial Usage Guidelines
- Local laws and regulations regarding game modifications
This project is licensed under the GNU GPL License - see the LICENSE file for details.