Ultra-fast, sub-10ms startup Minecraft Java Edition proxy/server backend built in Rust with Bevy ECS and Pumpkin Protocol.
Kraken is a high-performance Rust-based Minecraft server engine designed for low latency and high throughput. It features an ultra-fast asynchronous boot pipeline (starting in ~10ms), a protocol-aware proxy bridge (via the ViaKraken plugin), and a modular Bevy ECS backend utilizing Pumpkin Protocol primitives.
- ⚡ Ultra-Fast Startup: Asynchronous hardware diagnostic polling allows the server to fully initialize and bind to network ports in under 10ms.
- 🦀 Core: Built on Rust with optimized memory management and concurrent task execution.
- ⚙️ Network Engine: Native Minecraft Java protocol implementation powered by Pumpkin Protocol &
pumpkin-data, supporting multi-version client connections (up to 1.21.11 / 26.1). - 🧩 Architecture: Driven by Bevy ECS with a cleanly modularized backend (
src/viakraken/java/backend/) separated into dedicated state management, packet handlers, and session loops. - ⚔️ Combat & PvP: Real-time entity interactions including 1-heart melee punch damage, realistic fall damage mechanics, hurt animations (
CEntityStatus), and broadcasted sound effects (EntityPlayerHurt). - 🔄 Player Lifecycle: Instant respawns, persistent inventory & health tracking, real-time multiplayer tablist synchronization, and interactive
/gamemodeautocompletion. - 💾 Persistence: Embedded Sled storage for player state, compressed generated chunks, biome climate, and block modifications.
- 🌍 World Generation: Contextual biome borders, temperature, caves, depth-aware ores, and cross-chunk trees with on-demand chunk streaming.
- 👁️ View Distance: Honors each client's render-distance preference up to the configurable
view-distanceserver limit (default 16). - ☀️ Daylight Mobs: Summoned zombies burn and die when exposed to daytime sky; husks remain sunlight-immune.
Before any network listeners or game loops start, Kraken validates the EULA:
- If
eula.txtdoes not exist, the server creates it witheula=false, generates a defaultserver.properties, logs an alert, and halts immediately. - The engine will not bind to port 25565 or initialize internal systems until
eula=trueis set. Editeula.txtto accept the Mojang EULA before starting.
-
Clone the repository:
git clone https://github.com/itarqos5/KrakenMC.git cd KrakenMC -
Build and run:
cargo run --release
Kraken creates an empty ops.json beside the executable on first login. Add operators using the standard Minecraft format, then reconnect the player:
[
{
"uuid": "8667ba71-b85a-4004-af54-457a9734eed7",
"name": "Player",
"level": 4,
"bypassesPlayerLimit": false
}
]Only operators receive in-game command permission and may use /gamemode or the game-mode switcher. Console /op and /deop changes apply immediately.
Commands may be entered with or without the leading slash:
| Command | Description |
|---|---|
/help |
Show console command usage. |
/list |
List online players. |
/op <player> [level] |
Grant an online player operator level 1–4. |
/deop <player> |
Remove operator status. |
/kill <player> |
Kill an online player. |
/gamemode <mode> <player> |
Change an online player's game mode. |
/summon <entity> [x y z] |
Summon a registered entity; console defaults to 0 0 0. In-game use defaults to the executing player's position. |
To prevent monolithic file bloat, the Java backend is divided into specialized modules:
mod.rs: Manages TCP listener loops, status ping responses, and the initial login handshake state machine.state.rs: Thread-safe global registries (HashMap<Uuid, OnlinePlayer>) and tokio broadcast channels (PlayerEvent, chat, and block updates).handler.rs: Decodes incomingServerPacketpayloads (interact/attack, digging, block placement, chat commands) and processes combat physics.play.rs: Handles the active session loop, entity spawning/despawning, tablist updates, keep-alives, and chunk broadcasting.
By moving synchronous sysinfo hardware queries (OS memory and CPU enumeration) out of the critical bootstrap path and into a detached asynchronous thread, Kraken bypasses OS blocking calls during boot, consistently achieving start times around 10ms.
| File | Purpose |
|---|---|
eula.txt |
Mojang EULA acceptance flag. Must be eula=true to boot. |
server.properties |
Bind IP, port, target protocol, max players, MOTD, and maximum view distance. |
ops.json |
Operator UUIDs, names, permission levels, and player-limit bypass settings. |
world_data/ |
Sled database directory for player and chunk persistence. |
This project is licensed under the MIT License - see the LICENSE file for details.