Reference

Void is a Minecraft-compatible server framework written in Rust. It combines Bevy ECS for game logic with Tokio for asynchronous networking, giving you a modular, high-performance foundation for building custom Minecraft servers.

Crate Structure

Crate Description
void Core server framework — ECS components, systems, handlers, commands, world generation, and the public API.
void-net Low-level TCP socket abstraction (accept, read, write framed packets).
void-protocol Minecraft protocol definitions — serverbound/clientbound packet enums and data types.
void-codec Binary Encode/Decode traits and primitive type implementations.
void-codec-macros Derive macros (#[derive(Encode, Decode)]) and field attributes for codec automation.
voidmc-data Vanilla registry, block-state, and collision-shape data — extracted at build time and exposed as compile-time constants and typed structs.

Quick Start

Add void as a dependency, then create a minimal server:

use voidmc::{
    CommandBuilder, CommandRegistry, ServerBuilder, VoidServer,
    register_default_commands,
};

fn main() {
    VoidServer::new(ServerBuilder::new().build())
        .add_plugin(|app| {
            let mut registry = app.world_mut().resource_mut::<CommandRegistry>();
            register_default_commands(&mut registry, &[]);
        })
        .add_command(
            CommandBuilder::new("hello")
                .description("Greet the player")
                .handler(|ctx| {
                    ctx.reply("Hello from my server!");
                })
                .build(),
        )
        .run();
}

This starts a server on 127.0.0.1:25565 with default settings, all built-in commands, and a custom /hello command.

Server

Protocol & Codec

Gameplay

  • Command SystemCommandBuilder, argument parsers, flags, default commands
  • Player Management — Join/quit flow, visibility, position broadcasting, teleportation
  • World & Chunks — Chunk system, dimensions, streaming, world generators
  • Registry SystemRegistryDataStore API, default registries, customization

Vanilla Data