Skip to content

Block getter-placer mixins#118

Open
Flashing-Blinkenlights wants to merge 10 commits into
avdstaaij:masterfrom
Flashing-Blinkenlights:block-getter-placer-mixins
Open

Block getter-placer mixins#118
Flashing-Blinkenlights wants to merge 10 commits into
avdstaaij:masterfrom
Flashing-Blinkenlights:block-getter-placer-mixins

Conversation

@Flashing-Blinkenlights
Copy link
Copy Markdown
Collaborator

This is a reopening of #108 . I renamed the branch to maintain clarity.

@Flashing-Blinkenlights Flashing-Blinkenlights added the enhancement New feature or request label Feb 22, 2026
@avdstaaij
Copy link
Copy Markdown
Owner

This is a pretty major addition. I quite like the idea, but I currently don't have the time to do proper review of it. As we've discussed on Discord, it might be time for a transfer of maintainer. If it becomes you, then naturally you can continue ;)

Nonetheless, some design ideas:

  • It might be useful to add "perspective transformation" stuff like .transform and .pushTransform to the mixins. However, both the getter and setter could make use of it, and I'm not sure how to avoid a deadly diamond.
    • Alternatively, perhaps there could be something like a "transformed view" class that wraps a getter/setter. Instead of .pushTransform there could then be a method that takes a getter/setter and a transform, and returns a transformed view object.
  • Probably almost all methods that take an Editor (stuff in geometry and editor_tools) should be changed to take a blockSetter/getter/both. The line between editor_tools and minecraft_tools would then become a lot thinner, so perhaps those modules should then be merged. If the resulting module becomes too big, it might need to be split up in a different way.

The mixin system should also be explained in the documentation. Though of course, if the maintainer changes, then it's up to them.

The documentation currently fails to build due to an import error:

ImportError: cannot import name 'Model' from partially initialized module 'gdpc.model' (most likely due to a circular import) (/home/docs/checkouts/readthedocs.org/user_builds/gdpc/checkouts/118/src/gdpc/model.py)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants