Skip to content
JasperLorelai edited this page Jul 19, 2026 · 1 revision

Source Code

spell-class: ".targeted.PathfindToSpell"

Important

Since 4.0 Beta 19.

Value Supported
entity true
location false
entity_from_location false

Description:

Targeted entity spell, which prompts a Mob entity to pathfind and move to a position in the target's world.

Configuration:

These options support dynamic values through numeric or string expressions.

Option Description Type Default
position Vector
speed Double 1
distance-allowed Defines how close the entity may be to the destination before the spell is considered complete. 1
allow-interrupt Whether the entity may decide to break away from the pathfinding to do its own Vanilla movement. Boolean true
spell-on-arrive Optional spell to cast when the entity is within distance-allowed of the position. Sub-spell

Example:

move_to_me:
    spell-class: ".targeted.PathfindToSpell"
    position:
      x: "%var:meta_location_x%"
      y: "%var:meta_location_y%"
      z: "%var:meta_location_z%"
    speed: 1
    distance-allowed: 5
    allow-interrupt: false

Clone this wiki locally