Skip to content

Repository files navigation

UCraft

A lightweight Minecraft server implementation written in C, designed for machines with limited resources.

UCraft terrain generation

Procedurally generated terrain

UCraft implements just the bare essentials of the Minecraft protocol: clients can join, explore a procedurally generated world, chat, and break and place blocks. It provides the foundation for very primitive Minecraft gameplay — not a full server replacement.

Currently supports Minecraft 26.1.2 clients.

Features

  • Procedural terrain generation — an explorable world generated on demand as players move around
  • Primitive Minecraft gameplay — walk around, chat with other players, and break/place blocks
  • Online-mode encryption — authenticated logins through mbedTLS, or offline mode without it
  • Tiny footprint — ~46K-byte binary without authentication (~70K with), and ~50K bytes of memory on average (for a single player)

Building

The server was built and tested on Linux. On Windows, MSVC is required and on macOS, Xcode Command Line Tools and CMake are required.

sudo apt install git build-essential cmake make
git clone https://github.com/vimpop/UCraft/
cd UCraft && mkdir build && cd build
cmake ..
make

This produces an executable named UCraft in build/src.

Pre-built binaries are also available as artifacts of the GitHub Actions workflow runs.

Running

./src/UCraft
[INFO]: Listening on *:25565
[INFO]: UCraft server started!

Then connect to localhost:25565 with a Minecraft 26.1.2 client.

Implementations

  • Lightbulb (BL602 MCU) — implementation details here
  • Samsung C410W Printer (ARM BE MCU) - implementation details here

Your implementation could also be here! (feel free to open up a issue with your implementation)

Credits

  • Bixilon for help with major parts of the Minecraft protocol
  • wiki.vg for documenting Minecraft's protocol

License

MIT

About

A minecraft server implementation written in C for machines with limited resources.

Topics

Resources

Stars

494 stars

Watchers

7 watching

Forks

Releases

Packages

Used by

Contributors

Languages