Arrow Attack Conditional

Description

Works like rangedAttack, but the mob only shoots while the target and the mob match the given conditions. When the conditions stop matching, the mob stops shooting and keeps its target.

Attributes

Takes every attribute of rangedAttack, plus:

Attribute Aliases Description Default
targetconditions conditions, cond, c The conditions the target must match for the attack to start and continue
mobconditions mconditions, mcond, mc The conditions the mob itself must match for the attack to start and continue

Examples

ExampleMob:
  Type: SKELETON
  AIGoalSelectors:
  - 0 clear
  - 1 arrowAttackConditional{targetConditions=[ - isPlayer true ]}

Aliases

  • arrowAttackCond
  • rangedAttackConditional
  • rangedAttackCond
Updated Sep 23, 2026