# What's the speed that blocks regenerate from being hit?

What's the speed that blocks regenerate from being hit?

The Wiki on Breaking and Ticks isn't helping?

• You mean when you stop breaking it? Commented Sep 29, 2021 at 16:10
• @pinckerman - Yeah. Commented Sep 29, 2021 at 16:59

Per the wiki on breaking, there isn't a regeneration speed, only a digging speed:

The player's digging speed is controlled by three factors: the block being broken, the item the player is currently wielding, and the mining penalties affecting the player.

The regeneration you see is purely visual effect.

Overall, this is a simple but variable heavy calculation, and the wiki does a fantastic job on explaining each piece to the digging speed puzzle. For your convenience, I've brought over their pseudocode for calculating the digging speed:

``````if (isBestTool):
speedMultiplier = toolMultiplier

if (not canHarvest):
speedMultiplier = 1

else if (toolEfficiency):
speedMultiplier += efficiencyLevel ^ 2 + 1

if (hasteEffect):
speedMultiplier *= 1 + (0.2 * hasteLevel)

if (miningFatigue):
switch (miningFatigueLevel):
case 0:
speedMultiplier *= 0.3
case 1:
speedMultiplier *= 0.09
case 2:
speedMultiplier *= 0.0027
default:
speedMultiplier *= 0.00081

if (inWater and not hasAquaAffinity):
speedMultiplier /= 5

if (not onGround):
speedMultiplier /= 5

damage = speedMultiplier / blockHardness

if (canHarvest):
damage /= 30
else:
damage /= 100

# Instant breaking
if (damage > 1):
return 0

ticks = roundup(1 / damage)

seconds = ticks / 20

return seconds
``````

All of the information you need to populate the variables is available through the aforementioned wiki.

• Purely visual... ... So, if I stop breaking a block, I actually start all over again? Commented Sep 29, 2021 at 17:00
• @Malady yes. It's instantaneous. Commented Sep 29, 2021 at 17:09

From personal experience, if you don't break it on a single mining "session", the block returns as new. The regeneration is instant.

You can clearly see it on harder blocks like obsidian, if you stop just before it breaks and start over, you still need those 8-9 seconds to break it.

Visually - after 20s.

The block "heals" instantaneously if you release the 'attack' button while damaging it, or aim at a different block. But if you keep holding attack, but the distance between you and the targeted block increases enough that it gets out of range, the breaking progress is frozen. It doesn't revert/heal over time, and if you close the distance to resume breaking, it will be resumed at the point you left it off.

Additionally, releasing the mouse key leaves the block in visually "partially broken" state. At that point you can't resume it, as left-clicking any block (including the "partially broken" one) resets the progress to zero.

The blocks left in the "partially broken" state visually revert to 'undamaged' appearance after 20 seconds since damage was applied last, but if you didn't release attack in the meantime and didn't target any other block with your attack, you can still resume breaking from where you left off.

This breaking style is most frequently encountered when chopping down birch and spruce trees - if the tallest block is off your reach when standing on the ground, you can jump and break it eventually in several jumps, despite it coming out of your range as you land between the jumps.

• Oh, now that's interesting. Is that a known bug or just a feature? Commented Oct 11, 2021 at 20:52
• @Tacoタコス Hard to say. Probably a very unpolished, rudimentary implementation of a feature - the continuation of breaking itself seems to be an intended behavior, the rest is just whatever happens to occur in absence of proper implementation of all edge cases and exceptions.
– SF.
Commented Oct 12, 2021 at 9:42