Skip to content
JasperLorelai edited this page Aug 26, 2026 · 2 revisions

Source Code

spell-class: ".targeted.PathfindToSpell"

Important

Since 4.0 Beta 19.

Value Supported
entity true
location true
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
force-caster-navigator If the spell is cast at an entity target, when false, the target will go to position, when true, the caster, if a Mob, will go to the target's location instead. Boolean false
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