@@ -1144,7 +1144,7 @@ public void addBlocksToWorld(Level world, StructureTransform transform) {
11441144
11451145 translateMultiblockControllers (transform );
11461146
1147- GhostPlacementServerLevel ghost_level = null ;
1147+ GhostPlacementServerLevel ghostLevel = null ;
11481148
11491149 for (boolean nonBrittles : Iterate .trueAndFalse ) {
11501150 for (StructureBlockInfo block : blocks .values ()) {
@@ -1163,26 +1163,25 @@ public void addBlocksToWorld(Level world, StructureTransform transform) {
11631163 targetPos .relative (face ));
11641164
11651165 BlockState blockState = world .getBlockState (targetPos );
1166- if (blockState .getDestroySpeed (world , targetPos ) == -1 || (state .getCollisionShape (world , targetPos )
1167- .isEmpty ()
1168- && !blockState .getCollisionShape (world , targetPos )
1169- .isEmpty ())) {
1166+ if (blockState .getDestroySpeed (world , targetPos ) == -1 ||
1167+ (state .getCollisionShape (world , targetPos ).isEmpty () &&
1168+ !blockState .getCollisionShape (world , targetPos ).isEmpty ())) {
11701169 if (targetPos .getY () == world .getMinBuildHeight ())
11711170 targetPos = targetPos .above ();
11721171
1173- if (ghost_level == null && world instanceof ServerLevel serverWorld )
1174- ghost_level = new GhostPlacementServerLevel (serverWorld );
1172+ if (ghostLevel == null && world instanceof ServerLevel serverWorld )
1173+ ghostLevel = new GhostPlacementServerLevel (serverWorld );
11751174
1176- if (ghost_level != null ){
1177- ghost_level .setBlock (targetPos , state , Block .UPDATE_NONE );
1178- BlockEntity be = ghost_level .getBlockEntity (targetPos );
1175+ if (ghostLevel != null ){
1176+ ghostLevel .setBlock (targetPos , state , Block .UPDATE_NONE );
1177+ BlockEntity be = ghostLevel .getBlockEntity (targetPos );
11791178 if (be != null ) {
11801179 CompoundTag tag = block .nbt ();
11811180 tag = NBTProcessors .process (state , be , tag , false );
11821181 if (tag != null )
11831182 be .load (tag );
11841183 }
1185- ghost_level .destroyBlock (targetPos , true );
1184+ ghostLevel .destroyBlock (targetPos , true );
11861185 }
11871186 world .levelEvent (2001 , targetPos , Block .getId (state ));
11881187 continue ;
0 commit comments