{{about|the act of breaking blocks|items breaking due to low durability|durability}}
[[File:PunchTrees-GetWood.gif|thumb|upright=1.4|A [[player]] mines a [[tree]] and obtains a [[log]].]]
'''Breaking''', '''digging''', '''punching''', or '''mining''' is a common activity in ''[[Minecraft]]'', performed (by default) by holding the left mouse button or right trigger while the cursor is pointing at a [[block]], or by long-pressing on the block on touch screens. Breaking is the primary way to remove unwanted blocks and acquire blocks for future placement or [[crafting]].
== Basics of breaking ==
{{anchor|reach|Reach}}
By holding down the {{control|destroy}} button while the player is within range of the target block and while selecting the block, the player's hand begins swinging, making a repetitive "thump" sound as the player hits the block, and cracks appear on it while being broken.
{{IN|je}}, this range is 5.2 blocks in [[Creative]] mode, and 4.5 blocks otherwise. {{IN|bedrock}}, the range is 5 blocks when using a keyboard/mouse or controller input, and when using touch input, the range is 12 blocks in Creative mode and 6 blocks otherwise.
Blocks are marked with a wireframe cube outline (or turn slightly brighter on touch screens), making the current target easily visible (this can be toggled on and off {{in|PE}}). After the cracks completely cover the block, it breaks and depending on the type of block and the [[tool]] used to do so, it may drop an [[item]].
Although many blocks can be harvested with bare hands, certain ones require the use of a [[tool]]. In particular, to obtain resources from stone or metal-type blocks, the player must use a [[pickaxe]]. For harder blocks like [[iron ore]] or [[obsidian]], a pickaxe made from a higher-tier material is required.
The player can use [[shovel]]s, [[axe]]s and [[hoe]]s to speed up the breaking of dirt-type blocks, wood, and plant-type blocks, respectively. However, tools are not required to get the resource drop (with the exception of [[snow]] and [[snow block]]s, which require a shovel to get a drop). A downside to this is that tools also have [[durability]], so they eventually wear out.
If the tool has the [[Data component format#unbreakable|{{cd|minecraft:unbreakable}} item component]], it never breaks. {{IN|java}}, one can be acquired using the command {{cmd|give @s minecraft:diamond_pickaxe[minecraft:unbreakable{{=}}{can_destroy
tag. In [[Spectator]] mode a player can't break blocks in any way, and in [[Creative]] mode all blocks are breakable unless the player is holding a [[sword]], [[debug stick]], [[trident]], or [[mace]].
== 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. Every block has a hardness value, which determines the base amount of breaking time if the player hits it with their bare hands.
The base time in seconds is the block's hardness multiplied by:
* 1.5 if the player can harvest the block with the current tool;
* 5 if the player cannot.
Assuming that the player can harvest the block, the next check is whether the player's tool increases the breaking speed for the block. See [[#Best tools|Best tools]] for a full list.
If the [[tool]] helps, then it increases digging speed by a constant multiplier, given in the following table:
{| class="wikitable" style="text-align: center" data-description="Speed multipliers"
! Material
! Nothing
! Wood
! Stone
! Iron
! Diamond
! Netherite
! Gold
! Shears
! Sword
! Mace
|-
! Tool Speed
| 1
| 2
| 4
| 6
| 8
| 9
| 12
| 2 (5 on [[wool]], 15 on [[cobwebs]] and [[leaves]])
| 1.5 (15 on [[cobwebs]])
| 1.5 (on all blocks)
|}
If a proper tool is used, the tool speed is further increased by the [[Efficiency]] enchantment. If the level of Efficiency is not 0, then the level squared plus 1 is added to the tool speed. For example, Efficiency I adds 2 to the value, while Efficiency V adds 26. The speed is also increased by (20×level)% of [[Haste]] {{in|java}} or multiplied by (0.2×level+1)×(1.2^level) {{in|bedrock}}.
[[Mining Fatigue]] decreases the speed by multiplying by (0.3^min(level,4)) {{in|java}} or by (0.3^level)×(0.7^level) {{in|bedrock}}. If the player's head is underwater and they are not wearing a helmet with the [[Aqua Affinity]] enchantment, breaking a block takes 5 times as long. If the player's feet are not touching the ground, an additional 5x penalty is added; this causes players floating in water to break blocks 25x slower than if they had been standing on land.
The total time to break a block is always a multiple of {{frac|1|20}} of a second, or 1 game tick; any remainder is rounded up to the next tick.
=== Instant breaking ===
{{Main|Instant mining}}
When breaking a block, a tool and its enchantments do its speed value as "damage" to a block every game tick, and when that value exceeds the block's hardness times 30, the block breaks. If the tool and enchantments immediately exceed the hardness times 30, the block breaks with no delay; otherwise a 6 tick ({{frac|3|10}} second) delay occurs before the next block begins to break.
For example, a player with [[Haste]] II holding an [[Efficiency]] V [[diamond pickaxe]] (or [[netherite pickaxe]]) can break stone instantly, as the damage is ({{tooltip|8|A diamond pickaxe's base speed}}+{{tooltip|26|The boost from the efficiency enchantment.}})×{{tooltip|(1+0.4)|The Haste II multiplier}}=47.6, which is greater than the base hardness of stone (1.5) times 30 (which is 45). Players in creative mode always break blocks instantly regardless of tools or status effects, except for when wielding a sword, debug stick, trident or a mace, in which case the player is unable to break anything.
=== Calculation ===
Combining all of the information above yields the following pseudo-code to calculate how long in seconds a player takes to mine a certain block. All operations are floating-point, not integer.
-{}- if (isBestTool): speedMultiplier = toolMultiplier if (not canHarvest): speedMultiplier = 1 else if (toolEfficiency): speedMultiplier += efficiencyLevel ^ 2 + 1 else: speedMultiplier = 1 if (haste or conduitPower): speedMultiplier *= 0.2 * max(hasteLevel, conduitPowerLevel) + 1 if (miningFatigue): speedMultiplier *= 0.3 ^ min(miningFatigueLevel, 4){{only|je}} speedMultiplier *= 0.3 ^ miningFatigueLevel{{only|be}} if (inWater and not hasAquaAffinity): speedMultiplier /= 5 if (not onGround): speedMultiplier /= 5 damage = speedMultiplier / blockHardness if (canHarvest): damage /= 30 else: damage /= 100 if (haste or conduitPower): damage *= 1.2 ^ max(hasteLevel, conduitPowerLevel){{only|be}} if (miningFatigue): damage *= 0.7 ^ miningFatigueLevel{{only|be}} # Instant breaking if (damage > 1): return 0 ticks = roundup(1 / damage) seconds = ticks / 20 return seconds=== Best tools === Fastest tools to mine specific blocks: {| class="wikitable" data-description="Fastest tools" |- !width="10%"| Tool !width="10%"| Material !width="40%"| Blocks !width="40%"| Notes |- | rowspan="2"|{{ItemLink|Bucket}} | Liquid |
generic.block_interaction_range
attribute now allows the block break reach to be customized.}}
|{{HistoryLine|pocket alpha}}
|{{HistoryLine||unknown|Breaking sounds of blocks drastically changed, from being identical to those of Alpha-esque updates to sounds that were much different depending on if the game was being played on iOS or Android.}}
|{{HistoryLine||0.7.4|Buckets can no longer be used to literally mine water and lava.{{bug|MCPE-3857}}}}
|{{HistoryLine||0.12.1|dev=build 12|Breaking sounds are now the same as on PC. Prior to this update, the breaking sounds of most blocks differed greatly on iOS and Android.}}
}}
== Trivia ==
* In the code, unbreakable blocks use a hardness value of -1.
* The breaking animation appears off-center on certain blocks such as chests and signs.{{bug|MC-62197|||WAI}}
* Mining an ender chest with a wooden pickaxe takes the longest time in the game (16.9 seconds) to mine a block with the correct tool, without the effect of [[Mining Fatigue]] and other mining speed reduction events.
== Notes ==