BlockData class has no rotate data for Banners, End Rods
LadyCailinBot opened this issue ยท 6 comments
WORLDEDIT-3407 - Reported by Cryptite
Using rotate2D on a CuboidClipboard does not work with Banners/Wall Banners and End Rods as there is no definition for the data updates to the aforementioned blocks in BlockData.rotate90
Comment by wizjany
BlockData isn't even used anymore btw, you should be grabbing a worlddata instance such as LegacyWorldData and rotating based on the block states. [https://github.com/sk89q/WorldEdit/blob/master/worldedit-core/src/main/java/com/sk89q/worldedit/extent/transform/BlockTransformExtent.java#L109 like this] (although it's probably missing there too - i don't even know what an end rod is)
Comment by Cryptite
In my case I'm using CuboidClipboard's (admittedly deprecated) laodSchematic method and need to rotate that. Is there some new way to handle schematics?
FWIW End Rods are one of the new blocks in 1.9.
Comment by wizjany
https://github.com/sk89q/WorldEdit/blob/master/worldedit-core/src/main/java/com/sk89q/worldedit/session/ClipboardHolder.java#L78 this will automatically take care of rotating everything.
if you are using an entire clipboard, you should not be rotating individual blocks anyway, since rotate a block in space means both translating and rotating it to its new position and orientation.
Comment by Cryptite
Hmm, so what might the new behavior for loading a schematic be then?
https://github.com/desht/dhutils/blob/master/Lib/src/main/java/me/desht/dhutils/TerrainManager.java is what I used to be using.
Comment by wizjany
grab a clipboardreader from clipboardformat
http://forum.enginehub.org/threads/worldeditapi-questions.16061/#post-30630