Skip to main content

🛠️ Litematica to Schematic Converter

PyPI Version Python Version License Minecraft Version WorldEdit Format

Read this document in another language:
🇹🇷 Türkçe (Turkish)

A fast, reliable Python CLI tool and library to convert Minecraft Litematica (.litematic) schematics directly into WorldEdit / FastAsyncWorldEdit (FAWE) compatible Sponge V2 (.schem) format.


🎯 Purpose

In Minecraft, schematic files created by the Fabric/Quilt-based Litematica mod (.litematic) cannot be loaded directly by WorldEdit or FAWE plugins running on Forge, NeoForge, Paper, or Spigot servers.

This tool parses Litematica files directly at the NBT level without launching a Minecraft client and converts them into standard Sponge V2 .schem files.


✨ Features

  • 🧩 Multi-Region Merging & Conflict Policies: Automatically computes the global bounding box across all regions in a .litematic file, aligns relative region offsets, prevents air blocks from erasing solid blocks, and provides configurable conflict resolution (--on-overlap overwrite|keep-first|error).
  • 📦 Sponge V2 NBT Structure & Dynamic DataVersion: Preserves the source schematic's MinecraftDataVersion (falling back to 2586 only if missing) and builds a Sponge V2 NBT tree (Version: 2).
  • 🧰 BlockEntities & Entities Preservation: Transfers container inventories (chests, barrels, shulker boxes, signs) and entities (armor stands, item frames, paintings, minecarts) with global coordinate alignment, TileX/Y/Z recalculation, and UUID/Id sanitization.
  • 🔧 Modded & Vanilla Namespace Integrity: Preserves custom mod namespaces (e.g., create:brass_casing, ae2:controller[state=online]) while automatically prefixing un-namespaced vanilla identifiers with minecraft:.
  • 🔢 LEB128 VarInt Byte Encoding: Encodes block palette indices into signed 8-bit NBT ByteArray streams using dynamic LEB128 VarInt encoding, supporting palettes of any size (> 128 block states).
  • 📐 Negative Coordinate Axis Alignment: Regions saved with negative selection bounds in Litematica are automatically normalized to WorldEdit's (Y * Length + Z) * Width + X index ordering.

🧱 Minecraft Version Compatibility & Scope

This converter supports Minecraft 1.13+ schematics (1.13 through 1.20, 1.21+, etc.).

Why is 1.13 the Minimum Supported Version?

With Minecraft 1.13 ("The Flattening"), blocks transitioned from numeric IDs and metadata values (e.g., 35:14) to string-based namespaced block states (e.g., minecraft:red_wool). Sponge V2 palettes rely strictly on string-based block states and do not support legacy 1.12.2 numeric IDs.

How Newer Versions & Modded Blocks Work

Block IDs and block state properties (block.id and block.properties) are parsed dynamically from the input .litematic file alongside its MinecraftDataVersion tag, without a hardcoded block registry.

Known Format Limitations

  • No Cross-Version Block ID Remapping: The converter preserves the source schematic's DataVersion and block state strings as-is. Loading a 1.21 schematic on an older 1.16 server will not downgrade blocks that did not exist in 1.16.
  • Pending Ticks: Litematica's PendingBlockTicks and PendingFluidTicks have no standard equivalent in WorldEdit's Sponge V2 importer and are skipped with an informational console notice when present.
  • Dimension Bounds: Sponge V2 stores Width, Height, and Length as signed 16-bit Short integers, limiting each axis of the combined bounding box to a maximum of 32,767 blocks.

📥 Installation

Ensure you have Python 3.8+ installed on your system.

pip install litematic-to-schematic

(This automatically installs the lithetic, litematic-to-schematic, litematic2schem, and litematic2schematic CLI commands.)

Option 2: Install from Source

git clone https://github.com/Ohualtex/litematic-to-schematic.git
cd litematic-to-schematic
pip install .

🚀 Usage

1. Command-Line Interface (CLI)

Using the shorthand lithetic command (or litematic-to-schematic / litematic2schem / python convert.py):

lithetic sample_structure.litematic

Specify a custom output file path and multi-region overlap policy:

lithetic sample_structure.litematic -o my_building.schem --on-overlap keep-first

Display help menu:

lithetic --help

2. Windows Batch Script (start.bat)

  1. Double-click start.bat.
  2. Enter the name of your .litematic file when prompted (e.g., house.litematic).
  3. Your .schem file will be generated in the same directory.

3. Running the Test Suite

python -m unittest discover -s tests -v

📁 Project Structure

litematic-to-schematic/
├── pyproject.toml                  # PEP 621 package configuration & CLI entry points
├── requirements.txt                # Runtime dependencies (litemapy, nbtlib)
├── convert.py                      # Backward-compatible CLI/API wrapper script
├── start.bat                       # Windows interactive batch launcher
├── README.md                       # English documentation (default)
├── README_TR.md                    # Turkish documentation
├── LICENSE                         # MIT License
├── src/
│   └── litematic_to_schematic/
│       ├── __init__.py             # Package version & public API exports
│       ├── __main__.py             # `python -m litematic_to_schematic` entry point
│       ├── converter.py            # Core Litematica -> Sponge V2 conversion engine
│       └── cli.py                  # Argparse command-line interface
└── tests/
    └── test_converter.py           # Unit & integration test matrix (T01-T14)

📜 License

This project is licensed under the MIT License.


👤 Author

Ohualtex

Metadata

Release files for litematic-to-schematic 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for litematic-to-schematic 1.0.0
File Size Uploaded Provenance Actions
litematic_to_schematic-1.0.0.tar.gz 18.6 kB Without provenance Details for litematic_to_schematic-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for litematic-to-schematic 1.0.0
File Interpreter ABI Platform Actions
litematic_to_schematic-1.0.0-py3-none-any.whl Python 3 none any Details for litematic_to_schematic-1.0.0-py3-none-any.whl

Total release size: 30.7 kB

Release files / litematic_to_schematic-1.0.0.tar.gz

Download URL litematic_to_schematic-1.0.0.tar.gz
Size 18.6 kB
Tags Source
SHA-256 checksum
How to use checksums
ed6295d043a8ec9a8da9fe43059c87d377142dc15385a9bed2bc8e58e078c253
BLAKE2b-256 checksum
How to use checksums
1c2e60e803e56fa07843e1b23cca1527dc213c1e154ef771eb4b609d835d1742
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / litematic_to_schematic-1.0.0-py3-none-any.whl

Download URL litematic_to_schematic-1.0.0-py3-none-any.whl
Size 12.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9978c22a8156747ecd8c93d2b65e20c34c6aad6711b4f031f5c071757553c5b3
BLAKE2b-256 checksum
How to use checksums
2f198cd91e73e52ea6c1e61727e05f11acb02972e547148fe681fedbd639338a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for litematic-to-schematic 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page