@@ -32,12 +32,12 @@ object PlayerBuildLayerUtils {
3232
3333 if (flattenMode == FlattenMode .Staircase ) {
3434 val up = pos.up()
35- if ((blockState(up).isNotEmpty && (! baritoneSelection || (isInBaritoneSelection(up) == ! baritoneSelectionInverted)))
36- || (blockState(up.east()).isNotEmpty && (! baritoneSelection || (isInBaritoneSelection(up.east()) == ! baritoneSelectionInverted)))
37- || (blockState(up.south()).isNotEmpty && (! baritoneSelection || (isInBaritoneSelection(up.south()) == ! baritoneSelectionInverted)))
38- || (blockState(up.west()).isNotEmpty && (! baritoneSelection || (isInBaritoneSelection(up.west()) == ! baritoneSelectionInverted)))
39- || (blockState(up.north()).isNotEmpty && (! baritoneSelection || (isInBaritoneSelection(up.north()) == ! baritoneSelectionInverted)))
40- ) { return false }
35+ if ((blockState(up).isNotEmpty && (! baritoneSelection || (isInBaritoneSelection(up) == ! baritoneSelectionInverted))) ||
36+ (blockState(up.east()).isNotEmpty && (! baritoneSelection || (isInBaritoneSelection(up.east()) == ! baritoneSelectionInverted))) ||
37+ (blockState(up.south()).isNotEmpty && (! baritoneSelection || (isInBaritoneSelection(up.south()) == ! baritoneSelectionInverted))) ||
38+ (blockState(up.west()).isNotEmpty && (! baritoneSelection || (isInBaritoneSelection(up.west()) == ! baritoneSelectionInverted))) ||
39+ (blockState(up.north()).isNotEmpty && (! baritoneSelection || (isInBaritoneSelection(up.north()) == ! baritoneSelectionInverted)))
40+ ) { return false }
4141 }
4242
4343 val flattenY = player.y.ceilToInt()
@@ -46,8 +46,7 @@ object PlayerBuildLayerUtils {
4646 if (sneakLowersFlatten && player.isSneaking) flattenY - 1
4747 else flattenY
4848
49- if (! flattenMode.isSmart && pos.y < flattenLevel)
50- return false
49+ if (! flattenMode.isSmart && pos.y < flattenLevel) return false
5150
5251 if (pos == player.supportingBlockPos) return false
5352
@@ -60,19 +59,19 @@ object PlayerBuildLayerUtils {
6059
6160 val zeroedPos = pos.add(- playerPos.x, - flattenY, - playerPos.z)
6261
63- return (zeroedPos.x < 0 && smartFlattenDir == Direction .EAST )
64- || (zeroedPos.z < 0 && smartFlattenDir == Direction .SOUTH )
65- || (zeroedPos.x > 0 && smartFlattenDir == Direction .WEST )
66- || (zeroedPos.z > 0 && smartFlattenDir == Direction .NORTH )
62+ return (zeroedPos.x < 0 && smartFlattenDir == Direction .EAST ) ||
63+ (zeroedPos.z < 0 && smartFlattenDir == Direction .SOUTH ) ||
64+ (zeroedPos.x > 0 && smartFlattenDir == Direction .WEST ) ||
65+ (zeroedPos.z > 0 && smartFlattenDir == Direction .NORTH )
6766 }
6867
6968 fun isInBaritoneSelection (pos : BlockPos ) =
7069 BaritoneHandler .primary?.selectionManager?.selections?.any {
7170 val min = it.min()
7271 val max = it.max()
73- pos.x >= min.x && pos.x <= max.x
74- && pos.y >= min.y && pos.y <= max.y
75- && pos.z >= min.z && pos.z <= max.z
72+ pos.x >= min.x && pos.x <= max.x &&
73+ pos.y >= min.y && pos.y <= max.y &&
74+ pos.z >= min.z && pos.z <= max.z
7675 } ? : false
7776
7877 fun inSchematic (pos : BlockPos ): Boolean {
0 commit comments