Entity Checker
Entity Checker is used by entity-based ingredients to decide which entities are valid.
You will usually use it inside the entity ingredient.
Basic example
ingredients:
nearby_zombie:
type: entity
amount: 1
range: 5
check:
type: ZOMBIE
Multiple entity types
check:
types:
- ZOMBIE
- SKELETON
- CREEPER
Exclude an entity type
check:
notType: PLAYER
Display name filters
check:
displayName: "Dungeon Boss"
check:
displayNameContains: "Boss"
check:
hasAnyDisplayName: true
check:
hasNoDisplayName: true
Health filters
check:
minHealth: 10
check:
maxHealth: 20
check:
healthBetween:
min: 5
max: 15
check:
fullHealth: true
check:
damaged: true
Attribute filters
check:
attributes:
GENERIC_MAX_HEALTH:
min: 20
GENERIC_MOVEMENT_SPEED:
max: 0.3
Use valid Bukkit attribute names for your server version.
AI and behavior filters
check:
hasAI: true
check:
isLeashed: false
Status filters
check:
inWater: true
onGround: true
invisible: false
Other supported status fields:
check:
gliding: true
swimming: true
Age filters
check:
isBaby: true
check:
isAdult: true
Equipment filters
check:
hasItemInMainHand: true
check:
hasHelmet: true
Scoreboard tag filters
Single required tag:
check:
scoreboardTag: "altar_target"
Entity must not have a tag:
check:
notScoreboardTag: "blocked"
At least one tag:
check:
scoreboardTags:
mode: any
list:
- tag1
- tag2
All tags required:
check:
scoreboardTags:
mode: all
list:
- tag1
- tag2
Persistent data filters
Check that an entity has a persistent data key:
check:
persistentData:
myplugin:custom_key: {}
Check a string value:
check:
persistentData:
myplugin:custom_key:
value: "boss"
Check a typed value:
check:
persistentData:
myplugin:level:
type: INTEGER
value: 5
MythicMobs filters
Any MythicMobs mob:
check:
isanymythic: true
Specific MythicMobs mob:
check:
ismythic:
key: "fire_dragon"
MythicMobs must be installed and enabled.
Complete example
ingredients:
boss_nearby:
type: entity
amount: 1
range: 10
exclusive: false
consume: false
check:
type: ZOMBIE
displayNameContains: "Boss"
minHealth: 20
hasAI: true
scoreboardTag: "altar_boss"
How filters combine
All filters must match at the same time.
For example:
check:
type: ZOMBIE
minHealth: 20
scoreboardTag: "boss"
This means the entity must be:
- a zombie;
- at least 20 health;
- tagged with
boss.