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

        if (this.blockHitDelay > 0)
        {
            --this.blockHitDelay;
        }
        else if (this.creativeMode)
        {
            this.blockHitDelay = 5;
            this.netClientHandler.addToSendQueue(new Packet14BlockDig(0, par1, par2, par3, par4));
            PlayerControllerCreative.clickBlockCreative(this.mc, this, par1, par2, par3, par4);
        }
        else
        {
            if (par1 == this.currentBlockX && par2 == this.currentBlockY && par3 == this.currentblockZ)
            {
                int var5 = this.mc.theWorld.getBlockId(par1, par2, par3);

                if (var5 == 0)
                {
                    this.isHittingBlock = false;
                    return;
                }

                Block var6 = Block.blocksList[var5];
                this.curBlockDamageMP += var6.blockStrength(mc.theWorld, mc.thePlayer, par1, par2, par3);

                if (this.stepSoundTickCounter % 4.0F == 0.0F && var6 != null)
                {
                    this.mc.sndManager.playSound(var6.stepSound.getStepSound(), (float)par1 + 0.5F, (float)par2 + 0.5F, (float)par3 + 0.5F, (var6.stepSound.getVolume() + 1.0F) / 8.0F, var6.stepSound.getPitch() * 0.5F);
                }

                ++this.stepSoundTickCounter;

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