From 0b6dcb1fb700e07aa782160c931f2275a12c6efc Mon Sep 17 00:00:00 2001 From: Maddy Miller Date: Sat, 1 Oct 2022 07:20:39 +1000 Subject: [PATCH] Fixed clipboards failing to paste when a block has NBT data (#2198) --- .../com/sk89q/worldedit/function/block/ExtentBlockCopy.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/function/block/ExtentBlockCopy.java b/worldedit-core/src/main/java/com/sk89q/worldedit/function/block/ExtentBlockCopy.java index e6227ea80..e677eb35f 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/function/block/ExtentBlockCopy.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/function/block/ExtentBlockCopy.java @@ -92,7 +92,7 @@ private BaseBlock transformNbtData(BaseBlock state) { if (tag != null) { // Handle blocks which store their rotation in NBT LinTag rotTag = tag.value().get("Rot"); - if (rotTag.value() instanceof Number number) { + if (rotTag != null && rotTag.value() instanceof Number number) { int rot = number.intValue(); Direction direction = MCDirections.fromRotation(rot);