nbtschematic
A simple nbtlib Schema for reading or writing Schematic files for MCEdit and other world editors.
Installation
Python 3.8 or higher is required. You should probably create a new virtual environment before you install. Once you have activated your virtual environment, run
pip3 install nbtschematic
Examples
To load an existing MCEdit or other schematic file from disk, run:
from nbtschematic import SchematicFile
sf = SchematicFile.load('tests/test_schematic/simple.schematic')
print("The block at Y=%d, Z=%d, X=%d has block ID %d" %
(2, 3, 0, sf.blocks[2, 3, 0]))
To generate a schematic file in python, run:
from nbtschematic import SchematicFile
sf = SchematicFile(shape=(10, 8, 4))
assert sf.blocks.shape == (10, 8, 4)
sf.blocks[2, 3, 0] = 42
sf.save('example.schematic')
The size of the schematic should be defined at construction time. Resizing it will clear the blocks and block data.
Other fields of interest include:
data: Block data for each and every blockentities: Everything that is not a blockblockentities: Extended metadata for blocks
Further Reading
For more information about the underlying objects, see nbtlib's excellent
examples
page.
License - MIT
Metadata
Release files for nbtschematic 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nbtschematic-0.2.1-py3-none-any.whl | Python 3 | none | any | Details for nbtschematic-0.2.1-py3-none-any.whl |
Release files / nbtschematic-0.2.1-py3-none-any.whl
| Download URL | nbtschematic-0.2.1-py3-none-any.whl |
|---|---|
| Size | 6.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
37b16287469395ce0c2be71c5633dc7498aa8d8dca6ad6226114c05522eba55b
|
|
BLAKE2b-256 checksum How to use checksums |
79457cf66ff1cb66851dd656f6b9dc159b6ec625f6a597c7c48d3257cb67a714
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.4
|
Security for nbtschematic 0.2.1
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.