Placeholder for different entity information
A placeholder that allows you to get type, health, name, enum, maximum air, current air and so on information of the entity.
Meaning
Allows you to get many different information of the entities, like health, air, location, passengers etc.
Format
%CEP_entity_<action>_<separator>_(optional) <entity_uuid|player_name>%<action> – may be (for some actions see more info in the hint): (MANDATORY)
type
name
enum
maxAir
currentAir
walkSpeed
flySpeed
hasAI
tags
ticksLived
isGliding
isBlocking
isHandRaised
currentHealth
maxHealth
isSwimming
isSitting
isInWater
isInLava
isFrozen
isInvisible
isInvulnerable
isOnFire:<real | visual>
fireTicks
location:<(optional, in any order) world,x,y,z,yaw,pitch>
openInventory (alias: openInv)
openInventorySize (alias: openInvSize)
inventory (alias: inv)
inventorySize (alias: invSize)
openInventoryOwner:<uuid | type | enum | name | coords> (alias: openInvOwner)
openInventoryTitle (alias: openInvTitle)
passengers:<uuid | type | enum | name | coords>
target:<uuid | type | enum | name | coords>
canSee:<entity_uuid | player_name>
hasPath
path:<allPoints | lastPoint>
expPercent
targetBlock:<type | location | face>:<(may be empty) skipBlocks (throught comma in capital letters and with "-" instead of "_")>:<(may be empty, default - 50) distance>:<(may be empty, default - ALWAYS) fluidMode (see possible values here, also use "-" instead of "_")>
targetEntity:<type | location | face | uuid | enum | name>:<(may be empty, default - 50) distance>:<(may be empty, default - 0.5) raySize>
face
velocity:<x | y | z | xz | general>
color
pose (see available poses here)
spawnReason
workBlock:<type | loc (optional "loc:<world,x,y,z (through comma, in any order and presence)>")> (only for Paper 1.20.5+!)
isValid
realUUID:<SYNC | ASYNC=<key>>
uuidASYNC:<key>
isOnGround
<separator> – the separator to separate the elements in different cases, it is needed when more than one element is outputting, for example in "location" (note that the in actions like "passengers" with "coords" output type, that is with several different nesting levels of elements, the separator will be applied only to the highest nesting level, for example: "world;x;y;z<separator>world;x;y;z", that is ";" or other internal separators will not be changed); (MANDATORY)
<entity_uuid | player_name> – the UUID of an entity or the nickname of a player to get the information (you can skip it to use the current player). (OPTIONAL)
The "tags" is ScoreboardTags.
The "openInventory" is the type of the open inventory of the player.
The "openInventorySize" is the size of the open inventory of the player.
The "openInventoryOwner" is the owner of the open inventory of the player (it can be block, entity or another player).
The "openInventoryTitle" is the title of the open inventory of the player.
The "inventory" is the type of the current inventory of the entity.
The "inventorySize" is the size of the current inventory of the entity.
The "passengers" is the current passengers of the entity.
The "isBlocking" is for shields.
The "isHandRaised" is almost the same as "isBlocking", but activates instantly (while "isBlocking" activates after some delay).
The "target" is for an entity to which the specified entity is currently targeting.
The "canSee" outputs whether the player can see the entity or not (not potion effects, but hiding for example through the change_visibility action, and note that the before 1.18 version you can check only visibility of the player, not entities).
The "hasPath" outputs whether the entity has the path for moving currently (everytime entity moves it has the path, but only Mob entities (that is, entities like zombies, pigs and so on), otherwise you need to use for example change_destination to change the entity path), "path" outputs all coordinate points of the current path or the last point depending on the argument.
The "expPercent" outputs percentage of the player experience bar fullness.
The "targetBlock" outputs the block on which entity is looking, you can specify what to output in <output> option: type of the block, its location or facing (facing in case of blocks like doors, torches etc, see all types here and here); which blocks should be skipped for calculations in <skipBlocks> option, for example, if entity is targeting to the stone, it is possible to specify the "STONE" to skip it, but do not forget to skip the AIR too, otherwise you will always get the block at the entity's head (almost always AIR, only when you will be in some passable blocks like COBWEB or WATER it will return them); distance of the calculations in <distance> option and fluid collision mode in the <fluidMode> option (see all possible values here), fluid collision mode means whether the calculations will consider fluids or not (and some other special cases which you can see by the values link). Note that when <skipBlocks> option is specified, <fluidMode> option is not counted!
The "targetEntity" output the entity on which entity is looking, you can specify what to output in <output> option, desired distance in the <distance> option and how wide will be ray which touches the entities in the <raySize> option (0.4 is enough for the best accuracy, but you can specify for example 2 or even 3 and entities will expand their bounding boxes while doing calculations so that you will be able to catch entity even do not looking on it).
The "face" is for entity facing, for example NORTH or WEST and so on.
The "velocity" is the current velocity of the entity, you can specify which velocity you want to check, for example "general" for all three X, Y and Z dimensions, "xz" only for horizontal velocity, "Y" only for vertical velocity and so on.
The "color" outputs the color of the entity, for example sheeps or shulkers.
The "workBlock" outputs villagers working block type or location. Only for Paper 1.20.5+!
The "isValid" outputs whether the entity is alived currently (spawned. existed, online etc).
The "realUUID" outputs player's real (licensed) UUID. This option is needed if the server is in the offline mode and you want to know player's real UUID. Since this option depends on the Mojang servers activity, UUID returning requires more time, and if the servers will be offline you will not be able to obtain the value, this is why you have thread switching here: "SYNC" will do all on the main thread, which is not recommended due to answers delays, but the only way if you need to get the value right now, and "ASYNC=<key>" will do all in other third-party thread, you need to specify the key to store the value, then you will obtain "Loading..." right now, then after some time (usually ~half second) you will be able to use the same placeholder again and obtain the value by specified key.
The "uuidASYNC" outputs player's current UUID on the server, the same as "%player_uuid%" or "%parseother_{TestPlayer}_{player_uuid}%", but these placeholders are synchronous, which can cause small lags while obtaining uuid for the offline players, that is the reason why this version of placeholder exists, you can specify any target and desired "key", then you will obtain "Loading..." and after some time (usually ~half second) if write the same placeholder with the same key you will obtain the UUID (the principle is like in the "realUUID" option above for the ASYNC mode), this placeholder is very useful for different systems on server with large amount of offline players, also it is useful, for example, in customData placeholder to work with values for offline players efficiently by their uuids and not nicknames (and other placeholders/actions which are halfly or fully working with offline players, like change_balance or change_statistic).
Where is useful
Can be useful to get different information about entities while implementing different systems.
Examples
%CEP_entity_currentAir_,_{player}% # Get the remaining air of the current player%CEP_entity_location:world,y_,_8977317d-0f8d-4aa7-9045-8ad7da785289% # Get the world and the Y coordinate of the specified entity separating by comma%CEP_entity_openInventory_,% # Get the open inventory type of the current playerLast updated