|
1 | 1 | { |
2 | 2 | "$schema": "http://json-schema.org/draft-07/schema#", |
3 | 3 | "title": "Move Around Target", |
| 4 | + "description": "Allows an entity to move around a target. If the entity is too close (i.e. closer than destination range min and height difference limit) it will try to move away from its target. If the entity is too far away from its target it will try to move closer to a random position within the destination range. A randomized amount of those positions will be behind the target, and the spread can be tweaked with 'destination_pos_search_spread_degrees'.", |
4 | 5 | "type": "object", |
5 | 6 | "additionalProperties": false, |
6 | 7 | "properties": { |
7 | 8 | "priority": { "$ref": "../../general/v1.16.0/behaviorPriority.json" }, |
| 9 | + "destination_pos_spread_degrees": { |
| 10 | + "title": "Destination Pos Spread Degrees", |
| 11 | + "description": "This angle (in degrees) is used for controlling the spread when picking a destination position behind the target. A zero spread angle means the destination position will be straight behind the target with no variance. A 90 degree spread angle means the destination position can be up to 45 degrees to the left and to the right of the position straight behind the target's view direction.", |
| 12 | + "$ref": "../../../general/degree.json", |
| 13 | + "default": 90 |
| 14 | + }, |
8 | 15 | "destination_position_range": { |
9 | 16 | "title": "Destination Position Range", |
| 17 | + "description": "The range of distances from the target entity within which the goal should look for a position to move the owner entity to.", |
10 | 18 | "type": "array", |
11 | 19 | "minItems": 2, |
12 | 20 | "maxItems": 2, |
|
21 | 29 | } |
22 | 30 | ] |
23 | 31 | }, |
24 | | - "destination_pos_spread_degrees": { |
25 | | - "title": "Destination Pos Spread Degrees", |
26 | | - "$ref": "../../../general/degree.json", |
27 | | - "default": 90 |
| 32 | + "filters": { |
| 33 | + "title": "Filters", |
| 34 | + "description": "Conditions that need to be met for the behavior to start.", |
| 35 | + "$ref": "../../general/v1.16.0/filter.json" |
| 36 | + }, |
| 37 | + "height_difference_limit": { |
| 38 | + "title": "Height Difference Limit", |
| 39 | + "description": "Distance in height (in blocks) between the owner entity and the target has to be less than this value when owner checks if it is too close and should move away from the target. This value needs to be bigger than zero for the move away logic to trigger.", |
| 40 | + "type": "number", |
| 41 | + "default": 10 |
| 42 | + }, |
| 43 | + "horizontal_search_distance": { |
| 44 | + "title": "Horizontal Search Distance", |
| 45 | + "description": "Horizontal search distance (in blocks) when searching for a position to move away from target.", |
| 46 | + "type": "number", |
| 47 | + "default": 5 |
28 | 48 | }, |
29 | 49 | "movement_speed": { |
30 | 50 | "title": "Movement Speed", |
31 | | - "type": "number" |
| 51 | + "description": "The speed with which the entity should move to its target position.", |
| 52 | + "type": "number", |
| 53 | + "default": 0.6 |
32 | 54 | }, |
33 | | - "filters": { |
34 | | - "title": "Filters", |
35 | | - "$ref": "../../general/v1.16.0/filter.json" |
| 55 | + "vertical_search_distance": { |
| 56 | + "title": "Vertical Search Distance", |
| 57 | + "description": "Vertical search distance (in blocks) when searching for a position to move away from target.", |
| 58 | + "type": "number", |
| 59 | + "default": 5 |
36 | 60 | } |
37 | 61 | } |
38 | 62 | } |
0 commit comments