[Feature suggestion] Adding functions related to structure block?
17183248569 opened this issue ยท 2 comments
structure_block_load
structure_block_save
structure_block_tempsave (Behaves like a structural block activated by redstone)
structure_block_clear (Clears the cache on the structurefile and forces the disk to be read on the next load.)
......
While this isn't exactly what you are asking, given structure blocks are nbt files and Scarpet can read and write those, you can make your own functions to paste and load those (assuming they are in the app's data folder).
You can see an implementation of that behaviour in https://github.com/Ghoulboy78/Scarpet-edit/blob/64543f220242657c0086c20a4ccfb138bc7dcce5/se.sc#L1925. It's a bit difficult to find where it changes from save to load, etc, but it may be useful to you.
@altrisi
thanks you.
but after my reading and testing that script, i find some issues.
seems that the area is not correct.
maybe pos2=pos2+1
could fix that ?
seems that the one who writes the code incorrectly assumes that the map will remain its order.
https://github.com/Ghoulboy78/Scarpet-edit/blob/64543f220242657c0086c20a4ccfb138bc7dcce5/se.sc#L1963
I am concerned that the unnecessary use of parse_nbt here will disrupt some of the nbt types.