For the complete documentation index, see llms.txt. This page is also available as Markdown.

๐Ÿ”Match Entity Format

MatchEntityFormat is the shared configuration format used whenever EnchantedMobs needs to test a living entity.

It is used by power-generation match-entity sections, the match_entity Power Condition, and abilities such as nearby_entities that filter candidate entities.

match-entity:
  entity-types:
    - ZOMBIE
    - SKELETON
  entity-health: 20

The example matches a zombie or skeleton whose current health is at least 20.

Evaluation rules

A MatchEntityFormat section does not use a type field. Each recognized key enables one rule.

Rules on the same level use AND:

match-entity:
  monster: true
  ranged: true
  entity-health: 10

The entity must be a Bukkit monster, must satisfy the ranged check, and must currently have at least 10 health.

Within most list-based rules, entries use OR.

Empty and invalid inputs

  • A missing MatchEntityFormat section matches everything.

  • A missing entity does not match.

  • MatchEntityFormat accepts LivingEntity; non-living entities cannot be evaluated by this matcher.

  • An unrecognized key is ignored.

  • none: true forces the section to fail.

Logical composition

Use numbered any groups for alternatives that contain several rules:

Use not to reject any entity matching a nested rule:

See Logical Rules for exact any and not behavior.

Nested equipment matching

The equip rule contains one MatchItemFormat section per equipment slot:

Configured equipment slots use OR: matching either the main hand or helmet is enough for the equip rule to pass.

Optional rule availability

Rule
Requirement

mythicmobs

MythicMobs must be loaded when EnchantedMobs starts.

levelled-mobs

LevelledMobs must be loaded when EnchantedMobs starts.

Paper-specific ranged classification

On Paper, the entity must implement Paper's RangedEntity and hold a supported ranged weapon.

Unavailable integration rules are not registered. Their keys are ignored rather than treated as a failed match.

Rule index

Complete example

The entity must be a monster with at least 20 current health. It must either be a ranged bow/crossbow user or the MythicMob SkeletonKing, and it must not be a creeper.

  • MatchItemFormat: item rules used by equip.

  • Power Conditions: the match_entity condition selects a trigger-context entity and applies this format.

  • Abilities: nearby_entities uses MatchEntityFormat to filter nearby living entities.

  • Mechanics: power generation uses apply-rules.match-entity.

Last updated