Skip to content
This repository has been archived by the owner on Jan 11, 2024. It is now read-only.
/ minecraftrs Public archive

A rusty Minecraft backend. Aims to split core structures from vanilla definitions, allowing you to define your own set of blocks, biomes or entities instead of vanilla ones. New project: https://github.com/mindstorm38/mc173

Notifications You must be signed in to change notification settings

mindstorm38/minecraftrs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Minecraft RS

Pure Rust crates for Minecraft data manipulation. This cargo workspace aims to separate to split data structures from actual implementations. The two main crates in this repository are core and vanilla, they are the only available for now on crates.io.

Other crate such as worldgen, runtime and server are not actively maintained because the effort to keep these up-to-dates to the latest versions is too big. The worldgen crate is a little more maintained, but it is still a toy crate which currently only implements the 1.2.5 (without generated structures).

Core crate

Crates.io  Crates.io

The core crate define the most important and mandatory data structures used by Minecraft, this includes definition of optimized structures for blocks, biomes, heightmaps, entities. The main goal of these tiny structures is to be statically defined, so they don't take time to load at runtime, this also allows really simple equality test using their pointers. They also have a textual identifier in the usual Minecraft format namespace:key. Once statically defined, they need to be added a runtime registry that associate their static pointer to a linear positive integer id that can be used to efficiently serialize and deserialize these structures internally at runtime, for the serialization in static files, the integer id is mapped to the textual identifier, it's needed because integer ids might change between different runs of the crate.

These global registries are bundled in a "level environment" structure that is used by chunks stored inside a level. This crate also provides a way to source chunks for a level, and predefine an anvil chunk source to load world saved by Minecraft in the anvil format.

Vanilla crate

Crates.io  Crates.io

The vanilla provides static instances definition to use with global registries, it also provides a trait WithVanilla that is implemented on each structure that supports a vanilla variants, such as blocks, biomes and level environment.

About

A rusty Minecraft backend. Aims to split core structures from vanilla definitions, allowing you to define your own set of blocks, biomes or entities instead of vanilla ones. New project: https://github.com/mindstorm38/mc173

Topics

Resources

Stars

Watchers

Forks

Languages