diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/processor/PlacementStateProcessor.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/processor/PlacementStateProcessor.java index f024989be0..3479271d6d 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/processor/PlacementStateProcessor.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/processor/PlacementStateProcessor.java @@ -53,6 +53,7 @@ public abstract class PlacementStateProcessor extends AbstractDelegateExtent imp private static BlockTypeMask DEFAULT_MASK = null; private static BlockTypeMask IN_FIRST_PASS = null; private static BlockTypeMask REQUIRES_SECOND_PASS = null; + private static BlockTypeMask IN_FIRST_PASS_WITHOUT_SECOND = null; private static AdjacentAny2DMask ADJACENT_STAIR_MASK = null; protected final Extent extent; @@ -126,6 +127,9 @@ private static void setup() { ); IN_FIRST_PASS.add(BlockCategories.STAIRS.getAll()); + IN_FIRST_PASS_WITHOUT_SECOND = new BlockTypeMask(nullExtent); + IN_FIRST_PASS_WITHOUT_SECOND.add(BlockCategories.STAIRS.getAll()); + REQUIRES_SECOND_PASS = new BlockTypeMask(nullExtent); REQUIRES_SECOND_PASS.add( BlockTypes.IRON_BARS, @@ -242,7 +246,11 @@ private void checkAndPerformUpdate( int blockX = processChunkX + x; char ordinal = set[index]; BlockState state = BlockTypesCache.states[ordinal]; - if (firstPass && !IN_FIRST_PASS.test(state)) { + if (firstPass) { + if (!IN_FIRST_PASS.test(state)) { + continue; + } + } else if (IN_FIRST_PASS_WITHOUT_SECOND.test(state)) { continue; } if (!mask.test(state)) { @@ -358,7 +366,7 @@ public BlockState getBlockStateAt(int x, int y, int z) { } } } - return BlockTypesCache.states[ordinal]; + return state; } public LinCompoundTag getTileAt(int x, int y, int z) { @@ -425,7 +433,7 @@ private char getBlockOrdinal(int blockX, int blockY, int blockZ, BlockState stat } if (hadNesw) { if (dirs.contains(Direction.UP)) { - clickPos.mutY(blockY + 0.5); + clickPos.mutY(blockY + 0.6); } } else if (dirs.contains(Direction.UP)) { clickedFaceDirection = Direction.DOWN;