/// <summary>
        /// Called by Minecraft class when the player is hitting a block with an item. Args: x, y, z, side
        /// </summary>
        public override void ClickBlock(int par1, int par2, int par3, int par4)
        {
            if (CreativeMode)
            {
                NetClientHandler.AddToSendQueue(new Packet14BlockDig(0, par1, par2, par3, par4));
                PlayerControllerCreative.ClickBlockCreative(Mc, this, par1, par2, par3, par4);
                BlockHitDelay = 5;
            }
            else if (!IsHittingBlock || par1 != CurrentBlockX || par2 != CurrentBlockY || par3 != CurrentblockZ)
            {
                NetClientHandler.AddToSendQueue(new Packet14BlockDig(0, par1, par2, par3, par4));
                int i = Mc.TheWorld.GetBlockId(par1, par2, par3);

                if (i > 0 && CurBlockDamageMP == 0.0F)
                {
                    Block.BlocksList[i].OnBlockClicked(Mc.TheWorld, par1, par2, par3, Mc.ThePlayer);
                }

                if (i > 0 && Block.BlocksList[i].BlockStrength(Mc.ThePlayer) >= 1.0F)
                {
                    OnPlayerDestroyBlock(par1, par2, par3, par4);
                }
                else
                {
                    IsHittingBlock       = true;
                    CurrentBlockX        = par1;
                    CurrentBlockY        = par2;
                    CurrentblockZ        = par3;
                    CurBlockDamageMP     = 0.0F;
                    PrevBlockDamageMP    = 0.0F;
                    StepSoundTickCounter = 0.0F;
                }
            }
        }
        /// <summary>
        /// Called when a player damages a block and updates damage counters
        /// </summary>
        public override void OnPlayerDamageBlock(int par1, int par2, int par3, int par4)
        {
            SyncCurrentPlayItem();

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

            if (CreativeMode)
            {
                BlockHitDelay = 5;
                NetClientHandler.AddToSendQueue(new Packet14BlockDig(0, par1, par2, par3, par4));
                PlayerControllerCreative.ClickBlockCreative(Mc, this, par1, par2, par3, par4);
                return;
            }

            if (par1 == CurrentBlockX && par2 == CurrentBlockY && par3 == CurrentblockZ)
            {
                int i = Mc.TheWorld.GetBlockId(par1, par2, par3);

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

                Block block = Block.BlocksList[i];
                CurBlockDamageMP += block.BlockStrength(Mc.ThePlayer);

                if (StepSoundTickCounter % 4F == 0.0F && block != null)
                {
                    Mc.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;
                }
            }
            else
            {
                ClickBlock(par1, par2, par3, par4);
            }
        }
        public virtual void SetCreative(bool par1)
        {
            CreativeMode = par1;

            if (CreativeMode)
            {
                PlayerControllerCreative.EnableAbilities(Mc.ThePlayer);
            }
            else
            {
                PlayerControllerCreative.DisableAbilities(Mc.ThePlayer);
            }
        }
 public virtual void Func_6473_b(EntityPlayer par1EntityPlayer)
 {
     PlayerControllerCreative.DisableAbilities(par1EntityPlayer);
 }