Skip to main content

Get 25% OFF on your first order with BisectHosting using code "DAQEM"!

Distance

The arc:distance condition type checks if the player has traveled a certain distance while performing a continuous movement action (e.g., walking, swimming, sprinting).

Parameters

ParameterTypeRequiredDefaultDescription
distance_in_blocksintRequired-The distance in blocks.

Example

The following example will give the player an experience point every 100 blocks they walk.

data/my_datapack/arc/xp_for_walking.json
{
"holder": {
"type": "arc:player",
"id": "arc:player"
},
"type": "arc:on_walk",
"conditions": [
{
"type": "arc:distance",
"distance_in_blocks": 100
}
],
"rewards": [
{
"type": "arc:exp",
"min": 1,
"max": 1
}
]
}

Compatible Action Types