Fixes to Schematic Command relating to Entities
Fixes Schematic Command relating to Entities
- Add missing "glow_item_frame" entity to copied entities.
- Fix for Entity being pasted 1 block off of expected position after schematic is flipped.
- Fix for Entity being pasted with incorrect Yaw value after schematic is flipped.
- Fix for exception thrown when non-rotatable entity is rotated.
- Update command meta with missing supported entity types.
Notable potential issues
- Removed "rotation" value being tracked for entities in a schematic (note: this is not the "entity rotation" mechanism).
- The "rotation" value was tracking "how much should the entity rotate when being pasted", however complicated logic figuring out "how far to rotate" when flipping schematics correctly.
- Yaw and the entity rotation mechanism are now changed during schematic flip/rotate, aligning more with how blocks flip/rotate for schematics.
- This should only be an issue for users who have created a schematic, flipped/rotated, then saved that schematic - however the saved rotation value would have also been incorrect when saved.
Have you tested this very very very thoroughly with item frames in weird positions? There's a lot of obscure hacks in the original code that exist entirely because of incredibly specific edge-case behaviors with item frames
I'm pretty confident in the transformations for item_frame, glow_item_frame, and armor_stand. Attached are the script and schematic I've used during testing, which has a bunch of item frames and armor stands in all sorts of positions. The script pastes 50 copies of the schematic, applying a random transformation to the same schematic between each paste.
I did catch a comment in the pasteEntities method which referenced item_frame being weird, however no item_frames were incorrectly placed or broken during testing after the changes. item_frame entities do still spawn in with their (annoying) appropriate 0.03125 offset from the block they're attached to. Should I go back to test an older MC version to make sure this isn't something that will pop up again later?