mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-02-15 02:20:05 +00:00
Remove tile before calling destroy
This ensures that the tile will updating neighbouring blocks, and so the destroyed tile will not be wrapped as a peripheral.
This commit is contained in:
parent
1fdfcdb5f2
commit
60305cd106
@ -111,13 +111,13 @@ public abstract class BlockGeneric extends Block implements
|
||||
public final void breakBlock( @Nonnull World world, @Nonnull BlockPos pos, @Nonnull IBlockState newState )
|
||||
{
|
||||
TileEntity tile = world.getTileEntity( pos );
|
||||
super.breakBlock( world, pos, newState );
|
||||
world.removeTileEntity( pos );
|
||||
if( tile != null && tile instanceof TileGeneric )
|
||||
{
|
||||
TileGeneric generic = (TileGeneric)tile;
|
||||
generic.destroy();
|
||||
}
|
||||
super.breakBlock( world, pos, newState );
|
||||
world.removeTileEntity( pos );
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
|
Loading…
x
Reference in New Issue
Block a user