#minecraft #schematic #save #load #build #nbt #litematica

bin+lib mc_schem

A library to read, create, modify and write various Minecraft schematic files

5 stable releases

1.1.2 Apr 25, 2024
1.1.1 Feb 28, 2024
1.0.1 Feb 26, 2024

#239 in Game dev

Download history 28/week @ 2024-03-29 4/week @ 2024-04-05 109/week @ 2024-04-19 38/week @ 2024-04-26 1/week @ 2024-05-03 3/week @ 2024-05-17 2/week @ 2024-05-24

426 downloads per month

GPL-3.0-or-later

495KB
11K SLoC

mc_schem

A rust library to generate, load, manipulate and save minecraft schematic files.

Supported formats

Format Extension Load Save
Litematica .litematica
Vanilla structure .nbt
WorldEdit schem (1.13+) .schem
WorldEdit schem (1.12-) .schematic

Contents

  1. mc_schem (rlib)

    The main rust lib

  2. mc_schem (cdylib)

    C ffi for mc_schem

  3. mc_schem C++ wrapper

    A header-only c++ wrapper based on C ffi of mc_schem

  4. schemtool (executable)

    An executable to do various manipulations on schematics

Build

  1. Build with cargo directly (no c/c++ files)

    cargo build # debug
    cargo build --release #release
    
  2. Build with cmake (with c/c++ files)

    mkdir build
    cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DMC_SCHEM_RUST_TARGET=default -DCMAKE_INSTALL_PREFIX=install
    cmake --build build --parallel
    cmake --install build
    

Dependencies

~10–20MB
~269K SLoC