Skip to main content

Entity Conditions

Conditions that test a single entity.

Ability

Checks whether the player has a player ability turned on.

Advancement

Checks whether the player has completed an advancement.

Air

Compares how much air the entity has left with a number.

Attached To Rope

Checks whether the entity is at one end of a rope, and optionally how many.

Attack Charge

Checks how far the player's attack strength meter has recharged right now.

Attribute

Compares the total value of one of the entity's attributes with a number.

Biome

Checks whether the entity is in a given biome, one of several biomes, or a biome that passes a condition.

Block Collision

Checks whether the entity's bounding box, optionally moved, collides with a block.

Block In Radius

Counts the blocks around the entity that pass a condition and compares the count with a number.

Brightness

Compares the brightness at the entity's eyes, from 0 to 1, with a number.

Climbing

Checks whether the entity is climbing.

Collided Horizontally

Checks whether the entity is bumping into a block sideways, such as walking into a wall.

Command

Runs a command and compares its result with a number.

Creative Flying

Checks whether the player is flying the way Creative mode flight works.

Damage Would Kill

Checks whether taking a given amount of a given damage type right now would kill the entity.

Daytime

Checks whether it is daytime in the entity's world.

Difficulty

Passes when the world difficulty is one of the listed values.

Dimension

Checks whether the entity is in a given dimension.

Disguised

Checks whether the entity is disguised by Disguise As or the Disguise bi-entity action.

Distance From Coordinates

Compares the entity's distance from a point, such as the world origin or spawn, with a number.

Elytra Flight Possible

Checks whether the entity can glide, with an elytra or an apoli:elytra_flight power.

Enchantment

Compares the level of an enchantment on the entity's equipment with a number.

Entity Group

Checks whether the entity belongs to an entity group, such as undead or arthropod.

Entity In Radius

Counts the entities around the entity and compares the count with a number.

Entity Set Size

Compares how many entities an entity set power holds with a number.

Entity Type

Checks whether the entity is of a given entity type, or in an entity type tag.

Equipped Item

Checks whether the item in one of the entity's equipment slots passes an item condition.

Exists

Checks whether the entity is in the world. A player counts while they are online.

Exposed To Sky

Checks whether the sky is visible from the entity's position.

Exposed To Sun

Checks whether the entity is in direct sunlight, the same test vanilla uses to decide whether undead mobs burn.

Fall Distance

Compares how many blocks the entity has fallen with a number.

Fall Flying

Checks whether the entity is gliding, with an elytra, an elytra power or something similar.

Fluid Height

Compares how high a fluid reaches on the entity with a number.

Food Level

Compares the player's food level, from 0 to 20, with a number.

Gamemode

Checks which game mode the player is in.

Glowing

Checks whether the entity is glowing, from the Glowing effect or a glow power.

Grabbed

Checks whether the entity is being held by an apoli:grab.

Has Command Tag

Passes when the entity carries one of the given /tag command tags.

Has Location

Checks whether the entity has a position saved under a name.

Health

Compares the entity's current health with a number.

Hunger

Compares the entity's hunger or saturation.

In Block

Checks whether a block that passes a condition overlaps the entity's feet.

In Block Anywhere

Counts the blocks overlapping the entity's eyes or feet that pass a condition, and compares the count.

In Entity Set

Counts how many entity sets the entity is a member of.

In Rain

Checks whether it is raining at the entity's position.

In Snow

Checks whether it is snowing at the entity's position.

In Tag

Checks whether the entity's type is in an entity type tag.

In Team

Checks whether the entity is on a scoreboard team, optionally one matching specific properties.

In Thunderstorm

Checks whether it is thundering at the entity's position.

Inventory

Counts the items or stacks in the entity's inventory, or a power's inventory, that pass a condition, and compares the count.

Invisible

Checks whether the entity is invisible.

Key Pressed

Passes while a keybinding is held down.

Living

Checks whether the entity is a living entity.

Moving

Checks whether the entity is moving, horizontally, vertically or both.

NBT

Checks whether the entity's NBT contains the given data.

On Block

Checks whether the entity is standing on the ground, optionally on a block that passes a condition.

On Fire

Checks whether the entity is burning.

Owner

Checks the entity that owns this one, such as a minion's summoner, a pet's owner or a projectile's shooter.

Passenger

Compares how many passengers are riding the entity with a number.

Passenger Recursive

Compares how many passengers ride the entity, counting passengers of passengers, with a number.

Perspective

Checks which camera view a player is using: first person, or third person from behind or the front.

Player Model Type

Checks which skin model the player uses: the wide (Steve) arms or the slim (Alex) arms.

Power

Checks whether the entity has a power, or any power carrying one of the given tags.

Power Active

Checks whether a power, or any power carrying one of the given tags, is active: held, not suppressed, its condition met and toggled on.

Power Type

Checks whether the entity has a power of a given power type.

Predicate

Checks whether the entity passes a vanilla predicate.

Raycast

Casts a ray where the entity is looking and checks what it hits first.

Relative Health

Compares the entity's health, as a fraction of its maximum, with a number.

Resource

Compares the value of a resource power, or the remaining ticks of a power's built-in cooldown, with a number.

Riding

Checks whether the entity is riding another entity directly, optionally one that passes a condition.

Riding Recursive

Counts the entities below this one in its riding stack and compares the count with a number.

Riding Root

Checks whether the entity is riding something, looking at the entity at the bottom of the stack.

Saturation Level

Compares the player's hidden saturation level with a number.

Scale

Compares one of the entity's scales with a number.

Scoreboard

Compares the entity's score in a scoreboard objective with a number.

Script

Passes when a script returns true for the entity.

Send Condition

Asks an apoli:receive_condition power on the same entity for the answer.

Sneaking

Checks whether the player is sneaking.

Sound Playing

Checks whether a sound was played near the entity recently enough to still be audible.

Sprinting

Checks whether the player is sprinting.

Stat

Compares one of the player's statistics, the values on the Statistics screen, with a number.

Status Effect

Checks whether the entity has a status effect, optionally within a range of amplifiers and durations.

Stored Power

Checks what an entity is carrying in its apoli:power_storage.

Submerged In

Checks whether the entity's eyes are in a fluid from a fluid tag.

Swimming

Checks whether the player is swimming, in the swimming pose.

Tamed

Checks whether a tameable entity is tamed.

Tick Rate

Checks the tick rate the entity is running at, and whether time is frozen for it.

Time Of Day

Compares the world's time of day, in ticks, with a number.

Using Effective Tool

Checks whether the player is mining a block with the right tool for it.

Using Item

Checks whether the entity is using an item, such as eating, blocking with a shield or drawing a bow.

XP

Compares the entity's experience, in levels or points.

XP Levels

Compares the player's experience level with a number.

XP Points

Compares the player's experience points with a number.