Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

mcstructure logo

mcstructure

Read and write Minecraft .mcstructure files.

🌍 This README is also available in the following languages:

Code Style Documentation Status PyPI

In the entire project (and officially since the "Better Together Update") the term "Minecraft" refers to the edition of Minecraft that is also known as the "Bedrock Edition".

Features that this library provides are only useful for the above named edition of Minecraft.

This library lets you programmatically create and edit Minecraft structures. You are able to save these as .mcstructure files and for example use them in behavior packs.

You may as well read them to identify blocks and and entities that were saved with a Structure Block in-game.

Installation

pip install mcstructure

Basic Usage

from mcstructure import Block, Structure

struct = Structure(
    (7, 7, 7),
    Block("minecraft:wool", color = "red")
)

(struct
    .set_block((1, 1, 1), Block("minecraft:grass"))
    .set_block((2, 2, 2), Block("minecraft:grass"))
    .set_block((3, 3, 3), Block("minecraft:grass"))
    .set_block((4, 4, 4), Block("minecraft:grass"))
    .set_block((5, 5, 5), Block("minecraft:grass"))
    .set_block((6, 6, 6), Block("minecraft:grass"))
)

with open("house.mcstructure", "wb") as f:
    struct.dump(f)
with open("house.mcstructure", "rb") as f:
    struct = Structure.load(f)

References

External Resources


NOT AN OFFICIAL MINECRAFT PRODUCT. NOT APPROVED BY OR ASSOCIATED WITH MOJANG.

Metadata

Release files for mcstructure 0.0.1b6

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

Source distribution (sdist)

Source distribution for mcstructure 0.0.1b6
File Size Uploaded
mcstructure-0.0.1b6.tar.gz 64.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mcstructure 0.0.1b6
File Interpreter ABI Platform
mcstructure-0.0.1b6-py3-none-any.whl Python 3 none any Details

Total release size: 73.3 kB

Release files / mcstructure-0.0.1b6.tar.gz

Download URL mcstructure-0.0.1b6.tar.gz
Size 64.2 kB
Tags Source
SHA-256 checksum
How to use checksums
d7c92ad594ae4a9a965c55de0863c8ccd2d846db2fbbd1ebf79717a1c78447b9
BLAKE2b-256 checksum
How to use checksums
baf1459e412358c392d25e947fe2889afc9d564db2856d94eafd1b54e70fd096
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.1.3 CPython/3.11.13 Linux/6.16.1-arch1-1

Release files / mcstructure-0.0.1b6-py3-none-any.whl

Download URL mcstructure-0.0.1b6-py3-none-any.whl
Size 9.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
043e32bbf2016142b0d12c4f4ed81c75e5ce9b23ce3719648c295a9d28039ccc
BLAKE2b-256 checksum
How to use checksums
69f88fb2c26e7266e1e3fbe5cc028ea4b90556a3450bcaf1bf4240bee7afe95a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.1.3 CPython/3.11.13 Linux/6.16.1-arch1-1
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