Logical Rules
Last updated
Every rule on this page is a key inside a MatchEntityFormat section.
anyPurpose: Accepts an entity when at least one nested alternative matches.
Context: Nested sections use the same MatchEntityFormat rules.
any
unset
A direct rule section or numbered groups.
match-entity:
any:
entity-types:
- ZOMBIE
entity-contains-name:
- BossWhen any does not contain a key named 1, every directly nested rule is tested independently. The example matches a zombie or an entity whose name contains Boss.
When any contains a key named 1, each child is a complete MatchEntityFormat group:
rules inside one group use AND;
groups use OR.
A missing or empty any section returns true when evaluated.
Numbered-group mode is detected specifically by key 1; begin numbering at 1.
The direct layout treats rules as alternatives, not as one AND group.
Use numbered groups when one alternative needs multiple simultaneous requirements.
Optional integration rules that are not registered are skipped inside any, just as they are at the top level.
notPurpose: Rejects an entity when any nested rule matches.
Context: Nested keys use the same MatchEntityFormat rules.
not
unset
Rules whose matches should be rejected.
Nested rules are separate rejection alternatives.
The example rejects creepers or entities whose name contains Protected.
not does not combine all nested rules with AND and then invert the combined result.
An empty not section passes because no nested rule rejects the entity.
For complex accepted alternatives, use numbered any groups outside not and structure the surrounding matcher explicitly.
Last updated
match-entity:
any:
1:
entity-types:
- SKELETON
ranged: true
2:
mythicmobs:
- SkeletonKingmatch-entity:
monster: true
not:
entity-types:
- CREEPER
entity-contains-name:
- Protected