From 76efbed4b2881b797c91c925513b6c7a276460f2 Mon Sep 17 00:00:00 2001 From: dordsor21 Date: Mon, 30 Mar 2020 16:01:50 +0100 Subject: [PATCH] Fix rotation breaking NBT data: - Don't only copy NBT over if the original block had a Rot tag --- .../sk89q/worldedit/extent/transform/BlockTransformExtent.java | 2 +- .../sk89q/worldedit/function/operation/ForwardExtentCopy.java | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/extent/transform/BlockTransformExtent.java b/worldedit-core/src/main/java/com/sk89q/worldedit/extent/transform/BlockTransformExtent.java index 6a395446b..be7f26b24 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/extent/transform/BlockTransformExtent.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/extent/transform/BlockTransformExtent.java @@ -337,8 +337,8 @@ public class BlockTransformExtent extends ResettableExtent { values.put("Rot", new ByteTag((byte) MCDirections.toRotation(newDirection))); } } - return new BaseBlock(transformed, tag); } + return new BaseBlock(transformed, tag); } return transformed.toBaseBlock(); } diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/function/operation/ForwardExtentCopy.java b/worldedit-core/src/main/java/com/sk89q/worldedit/function/operation/ForwardExtentCopy.java index 1d1dfd8da..99155b842 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/function/operation/ForwardExtentCopy.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/function/operation/ForwardExtentCopy.java @@ -365,8 +365,7 @@ public class ForwardExtentCopy implements Operation { }; } copy = new CombinedBlockCopy(source, finalDest, copySrcFunc); - } - else { + } else { copy = new SimpleBlockCopy(source, finalDest); } if (this.filterFunction != null) {