コード例 #1
0
        public virtual bool Func_325_c(int i, int j, int k)
        {
            int l  = thisWorld.GetBlockId(i, j, k);
            int i1 = thisWorld.GetBlockMetadata(i, j, k);

            thisWorld.SendSoundEffectToAllPlayersWithin64(thisPlayer, 2001, i, j, k, l + thisWorld.GetBlockMetadata(
                                                              i, j, k) * 256);
            bool flag = RemoveBlock(i, j, k);

            net.minecraft.src.ItemStack itemstack = thisPlayer.GetCurrentEquippedItem();
            if (itemstack != null)
            {
                itemstack.Func_25124_a(l, i, j, k, thisPlayer);
                if (itemstack.stackSize == 0)
                {
                    itemstack.Func_577_a(thisPlayer);
                    thisPlayer.DestroyCurrentEquippedItem();
                }
            }
            if (flag && thisPlayer.CanHarvestBlock(net.minecraft.src.Block.blocksList[l]))
            {
                net.minecraft.src.Block.blocksList[l].HarvestBlock(thisWorld, thisPlayer, i, j, k
                                                                   , i1);
                ((net.minecraft.src.EntityPlayerMP)thisPlayer).netServerHandler.SendPacket(
                    new net.minecraft.src.Packet53BlockChange(i, j, k, thisWorld));
            }
            return(flag);
        }