Buggy code:
public class BlockSignal extends BlockContainer { public BlockSignal ( ) { } @ Override public boolean shouldSideBeRendered ( IBlockAccess par1IBlockAccess , int par2 , int par3 , int par4 , int par5 ) { } @ Override public boolean isOpaqueCube ( ) { } @ Override public int getRenderType ( ) { } @ Override public boolean onBlockActivated ( World world , int x , int y , int z , EntityPlayer player , int par6 , float par7 , float par8 , float par9 ) { <START_BUG> if ( ( Keyboard . isKeyDown ( KEY_RSHIFT ) ) || ( Keyboard . isKeyDown ( KEY_LSHIFT ) ) ) { <END_BUG> TileEntity te = world . getTileEntity ( x , y , z ) ; if ( ( te != null ) && ( te instanceof TileSignal ) ) { TileSignal tentity = ( ( TileSignal ) ( te ) ) ; if ( player . getCommandSenderName ( ) . matches ( tentity . blockOwner ) ) { player . openGui ( instance , 0 , world , x , y , z ) ; } } } else { ItemStack [ ] inventory = player . inventory . mainInventory ; TileSignal tentity = ( ( TileSignal ) ( world . getTileEntity ( x , y , z ) ) ) ; int coinsFound = 0 ; for ( int i = 0 ; i < ( player . inventory . getSizeInventory ( ) ) ; i ++ ) { ItemStack stack = player . inventory . getStackInSlot ( i ) ; for ( int j = 0 ; j < ( tentity . coins . length ) ; j ++ ) { if ( ( stack != null ) && ( ( stack . getItem ( ) ) == ( tentity . coins [ j ] ) ) ) { coinsFound += ( stack . stackSize ) * ( tentity . multiplier [ j ] ) ; player . inventory . setInventorySlotContents ( i , null ) ; } } } if ( world . isRemote ) return false ; if ( coinsFound < ( tentity . fee ) ) { player . addChatMessage ( new net . minecraft . util . ChatComponentText ( StatCollector . translateToLocal ( "signal.message.notenough" ) ) ) ; } else { player . addChatMessage ( new net . minecraft . util . ChatComponentText ( StatCollector . translateToLocal ( "signal.message.activated" ) ) ) ; coinsFound -= tentity . fee ; tentity . activateSignal ( ) ; } if ( coinsFound > 0 ) { Random rand = new Random ( ) ; while ( coinsFound > 0 ) { float rx = ( ( rand . nextFloat ( ) ) * 0.8F ) + 0.1F ; float ry = ( ( rand . nextFloat ( ) ) * 0.8F ) + 0.1F ; float rz = ( ( rand . nextFloat ( ) ) * 0.8F ) + 0.1F ; int logVal = Math . min ( ( ( int ) ( ( Math . log ( coinsFound ) ) // ( Math . log ( 9 ) ) ) ) , 4 ) ; int stackSize = Math . min ( ( ( int ) ( coinsFound // ( Math . pow ( 9 , logVal ) ) ) ) , 64 ) ; EntityItem entityItem = new EntityItem ( world , ( ( player . getPlayerCoordinates ( ) . posX ) + rx ) , ( ( player . getPlayerCoordinates ( ) . posY ) + ry ) , ( ( player . getPlayerCoordinates ( ) . posZ ) + rz ) , new ItemStack ( tentity . coins [ logVal ] , stackSize ) ) ; world . spawnEntityInWorld ( entityItem ) ; coinsFound -= ( Math . pow ( 9 , logVal ) ) * stackSize ; } } } return true ; } @ Override public void onBlockExploded ( World world , int x , int y , int z , Explosion explosion ) { } @ Override public void onBlockPlacedBy ( World world , int x , int y , int z , EntityLivingBase player , ItemStack stack ) { } @ Override public TileEntity createNewTileEntity ( World var1 , int var2 ) { } public int isProvidingWeakPower ( IBlockAccess block , int x , int y , int z , int side ) { } public int isProvidingStrongPower ( IBlockAccess block , int x , int y , int z , int side ) { } public boolean canProvidePower ( ) { } No newline ; at end ; of file ; }

Fix:
if ( player . isSneaking ( ) ) {