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β
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
distance_in_blocks | int | β Required | - | 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β
π¦Ά On Crouch
The arc:on_crouch action type is triggered when a player crouches (sneaks).
πͺ On Elytra Fly
The arc:onelytrafly action type is triggered when a player is flying with an elytra.
π On Horse Ride
The arc:onhorseride action type is triggered when a player is riding a horse.
πββοΈ On Sprint
The arc:on_sprint action type is triggered when a player is sprinting.
πββοΈ On Swim
The arc:on_swim action type is triggered when a player is swimming.
πΆββοΈ On Walk
The arc:on_walk action type is triggered when a player is walking.