Entities & mobs · Check
Entity has AI
Whether a mob's AI is on, so it moves and fights, or off so it stands like a statue.
m.entity.has_ai
In a flow
“When a player right-clicks an entity → If Entity has AI → Turn AI off.”
When a player right-clicks an entity → If Entity has AI → Turn AI off.
What it does
Whether a mob's AI is on, so it moves and fights, or off so it stands like a statue. It's a check: put it in an If, and the flow goes one way when it's true and the other when it isn't. Find it under Entities & mobs in the palette.
When to use it
Use it when the flow needs to: whether a mob's AI is on, so it moves and fights, or off so it stands like a statue.
When not to
To pick between more than two outcomes, Switch or Random reads better than a chain of checks.
Typical wiring
Sockets: settings you can wire
- Entity Entity
-
The entity it's about: wire one in, like Entity from Spawn an entity.
What goes there: Type it in the side panel, or wire in an entity. e.g. Zombie
If it's empty: Optional. Left empty and unwired, the step runs without it.