Metadata-Version: 2.1
Name: mcstructure
Version: 0.0.1b5
Summary: Read and write Minecraft .mcstructure files.
License: MIT
Project-URL: Documentation, https://mcstructure.readthedocs.io/en/latest/
Project-URL: Source Code, https://github.com/phoenixr-codes/mcstructure/
Keywords: mcstructure,Minecraft
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Education
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Games/Entertainment
Classifier: Typing :: Typed
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE.txt
Requires-Dist: numpy (>=1.21)
Requires-Dist: pynbt (>=2)
Provides-Extra: docs
Requires-Dist: furo ; extra == 'docs'
Requires-Dist: myst-parser (>=2) ; extra == 'docs'
Requires-Dist: Sphinx (>=7) ; extra == 'docs'
Requires-Dist: sphinx-copybutton (>=0) ; extra == 'docs'

<p align="center">
  <img
    src="https://raw.githubusercontent.com/phoenixr-codes/mcstructure/main/logo.png"
    width="120px"
    align="center" alt="mcstructure logo"
  />
  <h1 align="center">mcstructure</h1>
  <p align="center">
    Read and write Minecraft <code>.mcstructure</code> files.
  </p>
</p>

🌍 This README is also available in the following
languages:

* [🇨🇳 Chinese](./README_CN.md)
* [🇩🇪 German](./README_DE.md)

<!-- Not really accessible ♿️ but we get a better line
than the default "<hr/>" or "---" --> 
<h2></h2>

[![Code Style](https://img.shields.io/badge/code%20style-black-000000.svg?style=for-the-badge)](https://github.com/psf/black)
[![Documentation Status](https://readthedocs.org/projects/mcstructure/badge/?style=for-the-badge&version=latest)](https://mcstructure.readthedocs.io/en/latest/?badge=latest)
[![PyPI](https://img.shields.io/pypi/v/mcstructure?style=for-the-badge)](https://pypi.org/project/mcstructure)

_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 "Bedrock Edition"._

_Features that this library provide are only
useful for the above named edition of Minecraft._

> **Warning**
> This project is currently in the **BETA** version. Some
> features may not work as expected.

<!-- start elevator-pitch -->

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.

<!-- end elevator-pitch -->

Installation
------------

```bash
pip install mcstructure
```


Basic Usage
-----------

```python
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)
```

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


Useful Links
------------

* [👋 Introduction to Structure Blocks](https://learn.microsoft.com/en-us/minecraft/creator/documents/introductiontostructureblocks)
* [📖 Bedrock Wiki](https://wiki.bedrock.dev/nbt/mcstructure.html#file-format)
* [📖 Documentation](https://mcstructure.readthedocs.io/en/latest/)
* [📁 Source Code](https://github.com/phoenixr-codes/mcstructure)
* [🐍 PyPI](https://pypi.org/project/mcstructure/)

--------------------------------------------

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