public void onPlayerDamageBlock(int par1, int par2, int par3, int par4)
    {
        syncCurrentPlayItem();

        if (blockHitDelay > 0)
        {
            blockHitDelay--;
            return;
        }

        if (field_78779_k.func_77145_d())
        {
            blockHitDelay = 5;
            netClientHandler.addToSendQueue(new Packet14BlockDig(0, par1, par2, par3, par4));
            func_78744_a(field_78776_a, this, par1, par2, par3, par4);
            return;
        }

        if (par1 == currentBlockX && par2 == currentBlockY && par3 == currentblockZ)
        {
            int i = field_78776_a.field_71441_e.getBlockId(par1, par2, par3);

            if (i == 0)
            {
                isHittingBlock = false;
                return;
            }

            Block block = Block.blocksList[i];
            curBlockDamageMP += block.func_71908_a(field_78776_a.field_71439_g, field_78776_a.field_71439_g.worldObj, par1, par2, par3);

            if (stepSoundTickCounter % 4F == 0.0F && block != null)
            {
                field_78776_a.sndManager.playSound(block.stepSound.getStepSound(), (float)par1 + 0.5F, (float)par2 + 0.5F, (float)par3 + 0.5F, (block.stepSound.getVolume() + 1.0F) / 8F, block.stepSound.getPitch() * 0.5F);
            }

            stepSoundTickCounter++;

            if (curBlockDamageMP >= 1.0F)
            {
                isHittingBlock = false;
                netClientHandler.addToSendQueue(new Packet14BlockDig(2, par1, par2, par3, par4));
                onPlayerDestroyBlock(par1, par2, par3, par4);
                curBlockDamageMP = 0.0F;
                prevBlockDamageMP = 0.0F;
                stepSoundTickCounter = 0.0F;
                blockHitDelay = 5;
            }

            field_78776_a.field_71441_e.func_72888_f(field_78776_a.field_71439_g.entityId, currentBlockX, currentBlockY, currentblockZ, (int)(curBlockDamageMP * 10F) - 1);
        }
        else
        {
            clickBlock(par1, par2, par3, par4);
        }
    }