LibMultiPart
LibMultiPart copied to clipboard
Add rotation/mirroring/transformation support
This PR
This PR adds support for applying transformations to multipart blocks.
Extra Features
This PR has support for:
- [x] Handling when one part in a container can't be rotated/transformed in a way the container wants to be transformed.
- [x] Handling when a transformation is applied to the BlockState before the BlockEntity has been created/loaded. There are some rare circumstances under which this can happen, like if a multipart-block happens to be missing its BlockEntity before it gets transformed.
Testing
I have tested this PR with a build of WiredRedstone and found that it does correctly allow create contraptions to rotate the WiredRedstone parts.
Associated
This PR is intended to fix #52, but fixing #57, #58, and #59 may also be required in order for this PR to be tested properly.
I plan on working on a separate PR that adds this to 0.8.x-1.19.x LMP, once #51 is merged.
I still need to do some testing of this, but it is complete enough for review now.
Ok, initial tests with Create are looking good. I am able to move and rotate Create contraptions containing WiredRedstone wires and gates and everything seems to be working correctly.
Granted, this PR doesn't do anything to address Minecraft's lack of a way for mods to ask other mods to rotate around axes other than the Y-axis. I'll probably have to look into adding some Create-specific compat code. Though that might be better suited for a separate mod.