Code Monkey home page Code Monkey logo

minecraftrs's Introduction

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.