diff --git a/src/main/java/com/sk89q/worldedit/WorldEdit.java b/src/main/java/com/sk89q/worldedit/WorldEdit.java index 3f1f2a751..c5fe05436 100644 --- a/src/main/java/com/sk89q/worldedit/WorldEdit.java +++ b/src/main/java/com/sk89q/worldedit/WorldEdit.java @@ -404,6 +404,18 @@ public class WorldEdit { return blockInHand; } + blockId = blockInHand.getId(); + blockType = BlockType.fromID(blockId); + data = blockInHand.getData(); + } else if ("pos1".equalsIgnoreCase(testID)) { + // Get the block type from the "primary position" + final LocalWorld world = player.getWorld(); + final BlockVector primaryPosition = getSession(player).getRegionSelector(world).getPrimaryPosition(); + final BaseBlock blockInHand = world.getBlock(primaryPosition); + if (blockInHand.getClass() != BaseBlock.class) { + return blockInHand; + } + blockId = blockInHand.getId(); blockType = BlockType.fromID(blockId); data = blockInHand.getData();