aboutsummaryrefslogtreecommitdiffstats
path: root/docs/task-types/distancefrom-(task-type).md
blob: c50b47dbc5a928a59aa5f2d1d781cfe062586c2b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
---
title: distancefrom
parent: Built-in task types
grand_parent: Task types
---

# distancefrom (task type)

Since v2.12
{: .label .label-green }

Travel away from a set of co-ordinates.

## Options

| Key        | Description                                                     | Type    | Required | Default | Notes |
|------------|-----------------------------------------------------------------|---------|----------|---------|-------|
| `x`        | The x co-ordinate.                                              | Integer | Yes      | \-      | \-    |
| `y`        | The y co-ordinate.                                              | Integer | Yes      | \-      | \-    |
| `z`        | The z co-ordinate.                                              | Integer | Yes      | \-      | \-    |
| `world`    | The name of the world.                                          | String  | Yes      | \-      | \-    |
| `distance` | The distance away from the co-ordinates the player must travel. | Integer | Yes      | \-      | \-    |

## Examples

Travel at least 10 blocks away from (0, 0, 0) in world:

``` yaml
distancefrom:
  type: "distancefrom"
  x: 0                                  # x position
  y: 0                                  # y position
  z: 0                                  # z position
  world: world                          # name of world
  distance: 10                          # required distance from coordinates
```