ReadonlydimensionReadonlyidReadonlylocationReadonlytypeContent of the tag to add.
Returns true if the tag was added successfully. This can fail if the tag already exists on the entity.
Amount of damage to apply.
Optionaloptions: EntityApplyDamageByProjectileOptions | EntityApplyDamageOptionsAdditional options about the source of damage, which may add additional effects or spur additional behaviors on this entity.
Whether the entity takes any damage. This can return false if the entity is invulnerable or if the damage applied is less than or equal to 0.
Impulse vector.
Applies impulse vector to the current velocity of the entity.
This function can't be called in read-only mode.
X direction in horizontal plane.
Z direction in horizontal plane.
Knockback strength for the horizontal vector.
Knockback strength for the vertical vector.
Applies impulse vector to the current velocity of the entity.
This function can't be called in read-only mode.
Sets the current velocity of the Entity to zero. Note that this method may not have an impact on Players.
This function can't be called in read-only mode.
The identifier of the component (e.g., 'minecraft:rideable') to retrieve. If no namespace prefix is specified, 'minecraft:' is assumed. If the component is not present on the entity, undefined is returned.
Returns the component if it exists on the entity, otherwise undefined.
Returns all components that are both present on this entity and supported by the API.
Returns the current location of the head component of this entity.
Returns the current velocity vector of the entity.
Returns the current view direction of the entity.
The identifier of the component (e.g., 'minecraft:rideable') to retrieve. If no namespace prefix is specified, 'minecraft:' is assumed.
Returns true if the specified component is present on this entity.
Returns true if entity can be killed (even if it is already dead), otherwise it returns false.
Kills this entity. The entity will drop loot as normal.
This function can't be called in read-only mode.
Content of the tag to remove.
Returns whether the tag existed on the entity.
The command string. Note: This should not include a leading forward slash.
A command result containing whether the command was successful.
Command to run. Note that command strings should not start with slash.
For commands that return data, returns a JSON structure with command response values.
Represents the state of an entity (a mob, the player, or other moving objects like minecarts) in the world.