From 495b9d07b5f2d81ef7fe93d603f9d588540c7ee8 Mon Sep 17 00:00:00 2001 From: Matthew Miller Date: Thu, 11 Oct 2018 21:39:21 +1000 Subject: [PATCH] Not all "north/south/east/west" are boolean --- .../worldedit/extent/transform/BlockTransformExtent.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 8fea3cb81..d776be6b2 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 @@ -24,6 +24,7 @@ import static com.google.common.base.Preconditions.checkNotNull; import com.google.common.collect.Sets; import com.sk89q.worldedit.Vector; import com.sk89q.worldedit.WorldEditException; +import com.sk89q.worldedit.registry.state.BooleanProperty; import com.sk89q.worldedit.world.block.BaseBlock; import com.sk89q.worldedit.extent.AbstractDelegateExtent; import com.sk89q.worldedit.extent.Extent; @@ -140,8 +141,10 @@ public class BlockTransformExtent extends AbstractDelegateExtent { } List directionalProperties = properties.stream() + .filter(prop -> prop instanceof BooleanProperty) .filter(prop -> directionNames.contains(prop.getName())) - .filter(prop -> ((Boolean) block.getState(prop))) + .map(prop -> (BooleanProperty) prop) + .filter(block::getState) .map(Property::getName) .map(String::toUpperCase) .map(Direction::valueOf)