Skip to main content

Block Hardness

The arc:block_hardness condition type checks if the hardness of a block falls within a specified range.

Parameters

ParameterTypeRequiredDefaultDescription
minfloatOptional1.4e-45The minimum hardness value.
maxfloatOptional3.4028235e+38The maximum hardness value.

Example

The following example doubles the player's breaking speed for blocks with a hardness between 1.0 and 2.0.

data/my_datapack/arc/fast_break_medium_blocks.json
{
"holder": {
"type": "arc:player",
"id": "arc:player"
},
"type": "arc:on_get_destroy_speed",
"conditions": [
{
"type": "arc:block_hardness",
"min": 1.0,
"max": 2.0
}
],
"rewards": [
{
"type": "arc:destroy_speed_multiplier",
"multiplier": 2.0
}
]
}

Compatible Action Types