DenizenScript / Denizen

NPC and general Spigot scripting, using the Denizen Scripting Language!
https://denizenscript.com/
MIT License
213 stars 106 forks source link

Fixes to Schematic Command relating to Entities #2623

Open kitkatod opened 5 months ago

kitkatod commented 5 months ago

Fixes Schematic Command relating to Entities

Notable potential issues

mcmonkey4eva commented 5 months ago

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

kitkatod commented 5 months ago

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?

schemtesting.zip image