Skip to content

Commit 3c612fc

Browse files
committed
format cosmetic fix
1 parent cddb219 commit 3c612fc

File tree

2 files changed

+10
-15
lines changed

2 files changed

+10
-15
lines changed

src/main/java/com/simibubi/create/content/contraptions/Contraption.java

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1169,22 +1169,18 @@ public void addBlocksToWorld(Level world, StructureTransform transform) {
11691169
targetPos.relative(face));
11701170

11711171
BlockState blockState = world.getBlockState(targetPos);
1172-
if (world.isOutsideBuildHeight(targetPos) ||
1173-
blockState.getDestroySpeed(world, targetPos) == -1 ||
1174-
(state.getCollisionShape(world, targetPos).isEmpty() &&
1175-
!blockState.getCollisionShape(world, targetPos).isEmpty())) {
1172+
if (blockState.getDestroySpeed(world, targetPos) == -1 ||
1173+
(state.getCollisionShape(world, targetPos).isEmpty() && !blockState.getCollisionShape(world, targetPos)
1174+
.isEmpty() || world.isOutsideBuildHeight(targetPos))
1175+
) {
11761176
if (targetPos.getY() == world.getMinBuildHeight())
11771177
targetPos = targetPos.above();
1178-
11791178
world.levelEvent(2001, targetPos, Block.getId(state));
1180-
1181-
if (!shouldDropBlocks)
1182-
continue;
1183-
1184-
if(ghostLevel == null && world instanceof ServerLevel serverWorld)
1179+
if (!shouldDropBlocks)
1180+
continue;
1181+
if (ghostLevel == null && world instanceof ServerLevel serverWorld)
11851182
ghostLevel = new GhostPlacementServerLevel(serverWorld);
1186-
1187-
if(ghostLevel != null){
1183+
if (ghostLevel != null) {
11881184
ghostLevel.setBlock(targetPos, state, Block.UPDATE_NONE);
11891185
BlockEntity be = ghostLevel.getBlockEntity(targetPos);
11901186
if (be != null) {
@@ -1195,7 +1191,6 @@ public void addBlocksToWorld(Level world, StructureTransform transform) {
11951191
}
11961192
ghostLevel.destroyBlock(targetPos, true);
11971193
}
1198-
11991194
continue;
12001195
}
12011196
if (state.getBlock() instanceof SimpleWaterloggedBlock

src/main/java/com/simibubi/create/content/contraptions/GhostPlacementServerLevel.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public BlockEntity getBlockEntity(BlockPos pos) {
4444
BlockEntity blockEntity = blockEntities.getOrDefault(pos, null);
4545
if (blockState.hasBlockEntity() && blockEntity == null) {
4646
blockEntity = ((EntityBlock) blockState.getBlock()).newBlockEntity(pos, blockState);
47-
if(blockEntity != null)
47+
if (blockEntity != null)
4848
blockEntity.setLevel(this);
4949
pos = pos.immutable();
5050
blockEntities.put(pos, blockEntity);
@@ -58,7 +58,7 @@ public void removeBlockEntity(BlockPos pos) {
5858
}
5959

6060
@Override
61-
public boolean destroyBlock(BlockPos pos, boolean dropBlock, @Nullable Entity entity, int recursionLeft){
61+
public boolean destroyBlock(BlockPos pos, boolean dropBlock, @Nullable Entity entity, int recursionLeft) {
6262
BlockState blockState = getBlockState(pos);
6363
if (blockState.isAir())
6464
return false;

0 commit comments

Comments
 (0)