Crate mc_schem

Source
Expand description

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

§Supported formats:

  • 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

Modules§

block
Implement minecraft block and string id parsing
error
Errors in loading, saving and manipulating
old_block
Number id parsing
region
Implement region, entity, block entity and pending ticks
schem
Implement metadata, schematics and loading/saving
world

Macros§

unwrap_opt_tag
Unwrap a Option<&Value> or Option<&mut Value> as some type, if the option is None, returns Err(Error::TagMissing). If the option is not none, but the type doesn’t match, returns Err(Error::TagTypeMismatch).
unwrap_tag
Unwrap a Value as some type, otherwise return Err(Error::TagTypeMismatch).

Enums§

SchemFormat
Format of known schematics

Type Aliases§

Block
Block is a type of block with namespace and properties(aka attributes) in MC.
BlockEntity
Block entity(also known as tile entity) in MC, like chest, furnace, etc.
CommonBlock
Enumerate common blocks
DataVersion
Minecraft data versions.
Entity
An entity in MC, like zombie, minecart, etc.
Error
Errors when loading and saving schematic
LitematicaLoadOption
Options to load litematica
LitematicaSaveOption
Options to save litematica
MetaDataIR
Intermediate representation via different metadata formats
PendingTick
A tick waiting to be processed
Region
Region is a 3d area in Minecraft, containing blocks and entities.
SchemSlice
A 3d slice of schematic
Schematic
Schematic is part of a Minecraft world, like .litematic of litematica mod, .schem and .schematic of world edit, .nbt of vanilla structure.
VanillaStructureLoadOption
Options to load vanilla structure
VanillaStructureSaveOption
Options to save vanilla structure
WorldEdit12LoadOption
Options to load litematica
WorldEdit13LoadOption
Options to load litematica
WorldEdit13SaveOption
Options to save world edit 1.13+