From f84f3c6f851690822418b4ecd888c0b18813e0ad Mon Sep 17 00:00:00 2001 From: wizjany Date: Sun, 3 Mar 2019 19:51:49 -0500 Subject: [PATCH] Fix error when parsing hand/offhand/pos1 as blocks. --- .../extension/factory/parser/DefaultBlockParser.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/extension/factory/parser/DefaultBlockParser.java b/worldedit-core/src/main/java/com/sk89q/worldedit/extension/factory/parser/DefaultBlockParser.java index d6c62b4d1..4f3793adb 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/extension/factory/parser/DefaultBlockParser.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/extension/factory/parser/DefaultBlockParser.java @@ -238,7 +238,7 @@ public class DefaultBlockParser extends InputParser { } blockType = blockInHand.getBlockType(); - blockStates = blockInHand.getStates(); + blockStates.putAll(blockInHand.getStates()); } else if ("offhand".equalsIgnoreCase(typeString)) { // Get the block type from the item in the user's off hand. final BaseBlock blockInHand = getBlockInHand(context.requireActor(), HandSide.OFF_HAND); @@ -247,7 +247,7 @@ public class DefaultBlockParser extends InputParser { } blockType = blockInHand.getBlockType(); - blockStates = blockInHand.getStates(); + blockStates.putAll(blockInHand.getStates()); } else if ("pos1".equalsIgnoreCase(typeString)) { // Get the block type from the "primary position" final World world = context.requireWorld(); @@ -260,7 +260,7 @@ public class DefaultBlockParser extends InputParser { final BlockState blockInHand = world.getBlock(primaryPosition); blockType = blockInHand.getBlockType(); - blockStates = blockInHand.getStates(); + blockStates.putAll(blockInHand.getStates()); } else { // Attempt to lookup a block from ID or name. blockType = BlockTypes.get(typeString.toLowerCase());