public void onPlayerDamageBlock(int par1, int par2, int par3, int par4)
    {
        if (this.blockHitWait > 0)
        {
            --this.blockHitWait;
        }
        else
        {
            if (par1 == this.curBlockX && par2 == this.curBlockY && par3 == this.curBlockZ)
            {
                int var5 = this.mc.theWorld.getBlockId(par1, par2, par3);

                if (!this.mc.thePlayer.canPlayerEdit(par1, par2, par3))
                {
                    return;
                }

                if (var5 == 0)
                {
                    return;
                }

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

                if (this.blockDestroySoundCounter % 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.blockDestroySoundCounter;

                if (this.curBlockDamage >= 1.0F)
                {
                    this.onPlayerDestroyBlock(par1, par2, par3, par4);
                    this.curBlockDamage = 0.0F;
                    this.prevBlockDamage = 0.0F;
                    this.blockDestroySoundCounter = 0.0F;
                    this.blockHitWait = 5;
                }
            }
            else
            {
                this.curBlockDamage = 0.0F;
                this.prevBlockDamage = 0.0F;
                this.blockDestroySoundCounter = 0.0F;
                this.curBlockX = par1;
                this.curBlockY = par2;
                this.curBlockZ = par3;
            }
        }
    }