WorldEdit

WorldEdit

43M Downloads

BlockData class has no rotate data for Banners, End Rods

LadyCailinBot opened this issue ยท 6 comments

commented

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

commented

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)

commented

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.

commented

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.

commented

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.

commented

Comment by wizjany

grab a clipboardreader from clipboardformat

http://forum.enginehub.org/threads/worldeditapi-questions.16061/#post-30630

commented

Comment by Cryptite

Indeed, as you previously pointed out, even with new methodology, it still doesn't work because I think manual support for some block types needs to be added for things like Banners and End Rods.