Skip to content

Conversation

@NasheethAhmedA
Copy link
Contributor

This pull request introduces enhancements to the Structure class in the mcstructure module as per #23 , including improvements to block handling, a new method for combining structures, and corresponding tests to ensure functionality.

Enhancements to Structure class:

  • Updated get_block to handle negative indices by returning a minecraft:structure_void block if the index is negative.
  • Added a new combine method to merge two structures, ensuring proper handling of palettes and size.
    (src/mcstructure/__init__.py)

Test additions:

  • Added a new test, test_combine, to validate the behavior of the combine method, ensuring proper integration of two structures. (tests/test_structure.py)

Introduces a combine method to the Structure class, allowing one structure to be merged into another at a specified position. Also improves handling of structure voids for the `get_block` method
Introduces a new test case to verify the behavior of the Structure.combine method, ensuring correct block placement and handling of overlaps. Also adds minor formatting improvements for black linter.
@phoenixr-codes phoenixr-codes merged commit 76046f4 into phoenixr-codes:main Aug 21, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants