Vision Activities
Advanced AI behaviors for scanning fields of view and patrolling.
Activity Library
- Static Vision — Stationary scanning (Field of View).
- Patrol Vision — Scan while walking a path.
- Random Wander — Scan while wandering randomly.
- Spin Vision — Scan while spinning 360°.
- Target Chase — Scan while moving to target.
- Look At — Scan while tracking players.
Configuration
visibility_detection_activity
Base activity for scanning for players within a cone or sphere.
radius — Double
Max view distance.
fov — Double
Field of View angle (degrees).
shape — VisionShape
Detection shape: CONE or SPHERE.
showDisplay — Boolean
Debug: Visualize the view cone (Client-side).
patrol_visibility_detection_activity
Patrols a road network while scanning.
roadNetwork — RoadNetworkEntry
The path to patrol. nodeIds
"> Specific nodes to visit.
spin_visibility_detection_activity
Spins the NPC while scanning.
duration — Duration
Time for one full rotation.
axis — SpinAxis
Axis: YAW (horizontal) or PITCH (vertical).
look_close_visibility_detection_activity
Stares at nearby entities while scanning.
lookRange — Double
Distance to start tracking heads.
path_visibility_detection_activity
Follow a path while detecting players.
| Property | Value |
|---|---|
| Entry ID | path_visibility_detection_activity |
| Type | Activity |
| Color | Blue |
| Icon | mdi:vector-polyline |
| Field | Type | Description |
|---|---|---|
network | Ref<RoadNetworkEntry> | Road network the entity walks on. |
target | Position | Destination position on the network. |
precision | Double | How close the entity must get to consider a node reached. |
speed | Double | Movement speed along the path. |
visionRadius | Var<Double> | The radius of vision. |
fov | Var<Double> | Field of View in degrees (up to 360). |
shape | Var<VisionShape> | The shape of the vision detection. |
showDisplay | Var<Boolean> | Show debug display (client-side optimized). |
random_patrol_visibility_detection_activity
Randomly patrol nodes while detecting players.
| Property | Value |
|---|---|
| Entry ID | random_patrol_visibility_detection_activity |
| Type | Activity |
| Color | Blue |
| Icon | mdi:eye-plus |
| Field | Type | Description |
|---|---|---|
roadNetwork | Ref<RoadNetworkEntry> | Road network the entity patrols. |
patrolRadius | Double | Maximum distance in blocks from the entity's current position. |
visionRadius | Var<Double> | Maximum distance in blocks the NPC can see. |
fov | Var<Double> | Field of view in degrees (max 360). |
shape | Var<VisionShape> | Shape of the vision area. |
showDisplays | Var<Boolean> | Display debug visualization. |
stopWhenLooking | Boolean | Pause patrolling while a player is visible. |
Example
spin_visibility_detection_activity:
duration: 5s
radius: 20
fov: 45
triggers:
- sound_action:
sound: BLOCK_NOTE_BLOCK_PLING