Entity Querying

This collection of tricks provides options to gather information from entities in the world.

These tricks will blunder if their target is not being observed.

Keep in mind that entity fragments may decay.

Given an entity, returns its type.

Given an entity, returns the position of its feet.

Given an entity, returns the position of its head.

Given an entity, returns the facing of its head as a unit vector.

Given an entity, returns its current velocity as a vector in blocks per tick.

Given an entity, returns its height in blocks.

Given an entity, returns whether the entity is crouching.If the entity is unable to crouch, false will always be given.

Given an entity, returns whether the entity is on fire.

Given an entity, returns whether the entity is sprinting.If the entity is incapable of sprinting, false will always be given.

Given an entity, returns whether the entity is blocking using a shield.

Given an entity, returns its maximum health.Blunders if the entity does not have health.

Given an entity, returns its current health.Blunders if the entity does not have health.

Given an entity, returns its total armor value.Blunders if the entity cannot wear armor.

Returns the scale of the given entity.Blunders if the entity cannot scale.

Returns the identifiers of all the flecks the given player can see.If no player is supplied, the caster is queried for this information instead.

Given a player, returns their current food level.

Given a player, returns their current saturation.