Entity details
Some functions in CC: Tweaked (such as commands.getEntities) provide a way to get information about an entity.
This page details information about entities that CC: Tweaked may return.
Basic information
Entity information will always contain:
name: string: The namespaced ID for this entity, e.g.minecraft:player. See the Minecraft wiki for a list of vanilla entity IDs.
Example
A creeper:
{ name = "minecraft:creeper", count = 32, }
Display information
The display name of the entity.
displayName: string: The translated display name of the entity. This uses the server's language. This will typically be English on multi-player servers, and your current language on single player.
Example
A creeper:
{ name = "minecraft:creeper", displayName = "Creeper", }
Health
The health of an entity.
health: number: The current health of the entity.maxHealth: number: The maximum health of an entity.
Example
A player at max health.
{ name = "minecraft:player", displayName = "Alex", health = 20, maxHealth = 20, }
Entity tags
The tags an entity of this type has.
tags: { [string] = boolean }: The set of tags for this entity. This is a mapping of tag name totrue.
Changes
- New in version 1.118.0