@@ -1146,6 +1146,8 @@ public void addBlocksToWorld(Level world, StructureTransform transform) {
11461146 return ;
11471147 disassembled = true ;
11481148
1149+ boolean shouldDropBlocks = !AllConfigs .server ().kinetics .noDropWhenContraptionReplaceBlocks .get ();
1150+
11491151 translateMultiblockControllers (transform );
11501152
11511153 for (boolean nonBrittles : Iterate .trueAndFalse ) {
@@ -1172,7 +1174,9 @@ public void addBlocksToWorld(Level world, StructureTransform transform) {
11721174 if (targetPos .getY () == world .getMinBuildHeight ())
11731175 targetPos = targetPos .above ();
11741176 world .levelEvent (2001 , targetPos , Block .getId (state ));
1175- Block .dropResources (state , world , targetPos , null );
1177+ if (shouldDropBlocks ) {
1178+ Block .dropResources (state , world , targetPos , null );
1179+ }
11761180 continue ;
11771181 }
11781182 if (state .getBlock () instanceof SimpleWaterloggedBlock
@@ -1181,7 +1185,7 @@ public void addBlocksToWorld(Level world, StructureTransform transform) {
11811185 state = state .setValue (BlockStateProperties .WATERLOGGED , FluidState .getType () == Fluids .WATER );
11821186 }
11831187
1184- world .destroyBlock (targetPos , true );
1188+ world .destroyBlock (targetPos , shouldDropBlocks );
11851189
11861190 if (AllBlocks .SHAFT .has (state ))
11871191 state = ShaftBlock .pickCorrectShaftType (state , world , targetPos );
@@ -1200,7 +1204,7 @@ public void addBlocksToWorld(Level world, StructureTransform transform) {
12001204 if (verticalRotation ) {
12011205 if (state .getBlock () instanceof RopeBlock || state .getBlock () instanceof MagnetBlock
12021206 || state .getBlock () instanceof DoorBlock )
1203- world .destroyBlock (targetPos , true );
1207+ world .destroyBlock (targetPos , shouldDropBlocks );
12041208 }
12051209
12061210 BlockEntity blockEntity = world .getBlockEntity (targetPos );
0 commit comments