@@ -290,6 +290,7 @@ public static void moveBlocks(final ServerLevel level, final AssemblyTransform t
290290
291291 final LevelAccelerator accelerator = new LevelAccelerator (level );
292292 final LevelAccelerator resultingAccelerator = new LevelAccelerator (resultingLevel );
293+ final BlockState airState = Blocks .AIR .defaultBlockState ();
293294
294295 final List <BlockState > states = new ArrayList <>();
295296
@@ -378,6 +379,8 @@ public static void moveBlocks(final ServerLevel level, final AssemblyTransform t
378379 if (state .getBlock () instanceof final BlockSubLevelAssemblyListener listener ) {
379380 listener .afterMove (level , resultingLevel , state , block , newPos );
380381 }
382+
383+ level .onBlockStateChange (newPos , airState , state );
381384 } catch (final Exception e ) {
382385 Sable .LOGGER .error ("Failed to move block {} at {} to {}" , state , block , newPos , e );
383386 }
@@ -391,7 +394,7 @@ public static void moveBlocks(final ServerLevel level, final AssemblyTransform t
391394 try {
392395 final LevelChunk levelchunk = resultingAccelerator .getChunk (SectionPos .blockToSectionCoord (pos .getX ()), SectionPos .blockToSectionCoord (pos .getZ ()));
393396 final BlockState subLevelState = states .get (i );
394- SubLevelAssemblyHelper .markAndNotifyBlock (resultingLevel , pos , levelchunk , Blocks . AIR . defaultBlockState () , subLevelState , 3 , 512 );
397+ SubLevelAssemblyHelper .markAndNotifyBlock (resultingLevel , pos , levelchunk , airState , subLevelState , 3 , 512 );
395398 } catch (final Exception e ) {
396399 Sable .LOGGER .error ("Failed to mark & notify block {} (untransformed = {})" , pos , untransformed , e );
397400 }
@@ -402,21 +405,20 @@ public static void moveBlocks(final ServerLevel level, final AssemblyTransform t
402405 SableAssemblyPlatform .INSTANCE .setIgnoreOnPlace (resultingLevel , true );
403406 // destroy all the old blocks
404407 for (final BlockPos block : blocks ) {
405- final BlockState subLevelState = Blocks .AIR .defaultBlockState ();
406-
407408 try {
408409 final LevelChunk chunk = accelerator .getChunk (SectionPos .blockToSectionCoord (block .getX ()),
409410 SectionPos .blockToSectionCoord (block .getZ ()));
410411
411- chunk .setBlockState (block , subLevelState , true );
412+ level .onBlockStateChange (block , chunk .getBlockState (block ), airState );
413+ chunk .setBlockState (block , airState , true );
412414 } catch (final Exception e ) {
413415 Sable .LOGGER .error ("Failed to destroy old block during assembly {}" , block , e );
414416 }
415417 }
416418 SableAssemblyPlatform .INSTANCE .setIgnoreOnPlace (resultingLevel , false );
417419
418420 for (final BlockPos block : blocks ) {
419- final BlockState subLevelState = Blocks . AIR . defaultBlockState () ;
421+ final BlockState subLevelState = airState ;
420422 resultingLevel .sendBlockUpdated (block , Blocks .STONE .defaultBlockState (), subLevelState , 3 );
421423 }
422424 }
0 commit comments