A reimplementation of the Minecraft Server in pure Rust
Find a file
TheTxT 2151c5821f
All checks were successful
Build, test and push / formatting (push) Successful in 10s
Build, test and push / clippy (push) Successful in 1m9s
Build, test and push / test (push) Successful in 3m37s
Build, test and push / build_server_docker_image (push) Successful in 3m44s
Build, test and push / push_server (push) Successful in 13s
comment out some code to make warning go away
2026-04-08 14:26:13 +02:00
.forgejo/workflows Update ci config to not install additional components via rustup as 2026-03-08 14:53:17 +01:00
.github convert github actions workflow to forgejo actions 2025-08-18 18:15:03 +02:00
basic_types move block_types to basic_types crate 2026-03-08 21:22:08 +01:00
client_lib begin implementing a client library (client_lib) and end to end tests 2026-03-31 17:14:15 +02:00
data fix missing format! in data generator for recipe data crate 2026-03-09 15:24:50 +01:00
data_generator_tools fix missing format! in data generator for recipe data crate 2026-03-09 15:24:50 +01:00
e2e_tests comment out some code to make warning go away 2026-04-08 14:26:13 +02:00
lib begin implementing a client library (client_lib) and end to end tests 2026-03-31 17:14:15 +02:00
proxy update crates to version 0.6.0 2026-03-05 17:04:23 +01:00
server make smoker and blast_furnace work as well #56 2026-03-19 16:54:33 +01:00
.gitignore Merge branch 0.4.0 into main 2026-01-18 14:16:55 +01:00
Cargo.lock begin implementing a client library (client_lib) and end to end tests 2026-03-31 17:14:15 +02:00
Cargo.toml begin implementing a client library (client_lib) and end to end tests 2026-03-31 17:14:15 +02:00
docker-compose.build.yml Added OXIDE_MOTD config 2025-09-02 10:24:28 +02:00
docker-compose.yml Whoops 2025-09-02 10:38:11 +02:00
Dockerfile fix Dockerfile 2025-09-13 19:10:05 +02:00
LICENSE Create LICENSE 2025-07-27 14:30:41 +02:00
README.md Update README.md 2026-03-08 21:02:41 +01:00
rustfmt.toml fix last commit 2026-03-08 21:27:56 +01:00

The primary source lives on my own forgejo instance at git.thetxt.io. Please also submit issues there. Registration also works through your GitHub or Discord account, so you don't have to remember yet another password.

Oxide

The Oxide Minecraft Server aims to implement a fully functional Minecraft Server, compatible with the latest version, from scratch entirely in Rust.

You can try it right now by joining play.oxide.thetxt.io

This repository contains the Oxide Minecraft Server, as well as all auxillary parts described below. Each of these parts live in their own subdirectory.

The main purpose of this repository is for me to learn and share my gained knowledge through a series of YouTube videos.

Please don't run it with any worlds you aren't prepared to lose.

Features

Currently implemented

This list is non-exhaustive, but covers the most important parts.

  • Multiple players with basic interactions (see item in hand or armor and their position)
  • Chat (without encryption) and some basic commands
  • Placing and breaking blocks (very few block state rules implemented)
  • Loading and saving vanilla worlds
  • Creative mode
  • Basic survival features (WIP)
  • Block entities (chests, furnaces (only smelting raw iron with coal) and signs for now)
  • Entities with basic AI
  • Crafting & Smelting

Missing

These will be implemented in the nearish future

  • More commands
  • Nether and End dimensions
  • Protocol encryption / online mode
  • Packet compression
  • More block state rules
  • Rules on which blocks can be placed on which other blocks

Running

For testing

You can run the server by just executing cargo run in the server subdirectory.

For "production"

Remember, this is very alpha software that will at some point delete your worlds or damage them otherwise!

I recommend running through docker using the provided docker-compose.yml file. There is also a docker-compose.build.yaml file that builds a fresh image locally, instead of using the pre-built image from the gibthub container registry.

Configuration

Configuration is handled through environment variables.

Key Default value Format Notes
OXIDE_LISTEN_ON 0.0.0.0:25565 [ip]:[port]
OXIDE_WORLD_PATH ./world any path ./ must be explicitly stated
OXIDE_SAVE_SECONDS 60 Whole seconds
OXIDE_MOTD Hello oxide! String Quick and dirty hack, Freaks out on windows if string is contained in quotes or includes spaces and i don't know why...
OXIDE_DEFAULT_GAMEMODE survival survival OR creative OR adventure OR spectator The gamemode players that connect for the first time get assigned

Repository contents

server

This is the actual Minecraft server.

proxy

This is a very basic proxy to intercept communication between the minecraft client and server. It listens on localhost port 35565 and connects to a server running on localhost port 25565, without a way to configure these at the moment. It has access to all the packet deserialization/serialization code which makes this proxy useful for testing their implementations against the official minecraft server.

lib

A library containing common functionality that is shared between the server and proxy. This mostly includes the logic to deserialize and serialize packets and some common types.

basic_types

As the name suggests, this library crate contains some basic types that are used by all other crates.

data_generator_tools

Extremely rough program to generate the data library crate from the official servers generated json files. It expects a directory official_server in the root of the project. The jar of the desired official server then needs to be downloaded into this directory. Executing java -DbundlerMainClass="net.minecraft.data.Main" -jar official_server.jar -all then generates the required json files. Afterwards you can run cargo run -p data_generator_tools to generate/update the data crate.

data

Another library that contains data on biomes, blocks, items, block entities, inventories, loot tables, recipes and tags. It is mostly generated using the data_generator_tools crate.

Contributing

At the moment I'm not looking for major source code contributions. If you encounter a minor bug and decide to fix yourself, then feel free to open a PR and I will take a look.

Instead, the best way for you to help is to spread the word about this project and to test it yourself. If you encounter any bugs or have ideas for things that could be improved, then please open an issue or get in touch otherwise.

The last option is to support me financially, which would make it possible for me to invest more time into Oxide. Please only do this if you can afford it.

Dependencies

This project aims to minimally rely on third party dependecies. Everything related to Minecraft is fully custom. There are still some third party dependencies:

  • flate2 for compression and decompression
  • dashmap for parallel hashmaps
  • rand for random number generation

The jzon crate is also used in the data_gnerator_tools utility for working with the generated json files from the official Minecraft server.

Credit

This project wouldn't be possible without the contributors of the Minecraft wiki.