SpongeAPI icon indicating copy to clipboard operation
SpongeAPI copied to clipboard

Make schematics rotatable

Open eirikh1996 opened this issue 4 years ago • 3 comments

Make it possible to rotate schematics in the Sponge API. They are currently not rotatable

eirikh1996 avatar Apr 02 '20 17:04 eirikh1996

It would be pretty trivial to rotate a block volume as-is, however I suspect you're also looking to rotate directional blocks such as stairs too. From what I recall, there isn't any generic way of doing this; each block would have to be handled specially. I don't think this is possible with modded blocks as sponge does not know how to handle them.

simon816 avatar Apr 03 '20 19:04 simon816

From what I recall, there isn't any generic way of doing this; each block would have to be handled specially. I don't think this is possible with modded blocks as sponge does not know how to handle them.

Yep, and this is precisely why schematics originally didn't handle them well enough.. There's a lot of block logic specific code that has to be handled, but the hooks do exist in the vanilla blocks, but I almost sincerely doubt that some mod blocks correctly override those methods to perform their rotations correctly.

It's a feature that'd be very welcome to being PR'ed in both API and Common (since both hooks exist in native vanilla mc), but will likely need to be tested against in the integration test in SpongeForge.

gabizou avatar Apr 03 '20 20:04 gabizou

For what its worth: In #2241, I've added the relevant API's to support this feature, but the caveat is that it repurposes an existing API class name for the actual better name.

It's very well possible to back port the API addition for 7.4+, but acknowledgement of the classname changes would be required (the implementation is about as trivial as well). Rotating the actual schematic is albeit a little different.

gabizou avatar Oct 03 '20 07:10 gabizou