This packet is sent to all players aswell to reflect the block's status. After x time has elapsed, the block is broken and between 0 and x time you accordingly display the correct block break %. Basically you are sending packets to show the block break animation at the percentage you want, but always setting the blocks actual serverside break durability to 0. I'd really suggest reading through the code to actually understand what is going on rather than copy pasting (not that raw copy pasting will work anyway).
I had the same issue a while back when approaching exactly the same idea.