Minecraft servers for the modern age

Valence is a Rust framework for building modular and high performance Minecraft servers.

GitHub Repo starsGitHub release (with filter)Discord
Quick Start


fn pause_on_crouch(
    mut events: EventReader<SneakEvent>,
    mut board: ResMut<LifeBoard>,
    mut layers: Query<&mut EntityLayer>,
) {
    for event in events.iter() {
        if event.state == SneakState::Start {
            let mut layer = layers.single_mut();

            if board.playing {
                board.playing = false;
                layer.set_action_bar("Paused".italic().color(Color::RED));
            } else {
                board.playing = true;
                layer.set_action_bar("Playing".italic().color(Color::GREEN));
            }
        }
    }
}
Overview