Skip to content

Entity Modifiers

ErrorCraft edited this page Oct 18, 2021 · 6 revisions

Entity modifiers are JSON files in data packs placed under the modifiers/entities folder in your namespace. These modifiers can be applied using the entity command.

minecraft:set_health

Sets the health of a living entity.

Properties

health: A number provider. Specifies the health to set.
add: An optional boolean. If true, change will be relative to the current health.

Example

{
    "function": "minecraft:set_health",
    "health": 5.0,
    "add": true
}

minecraft:set_invulnerable

Sets the invulnerability of an entity.

Properties

invulnerable: A boolean. If true, the entity won't take any damage.

Example

{
    "function": "minecraft:set_invulnerable",
    "invulnerable": true
}

Clone this wiki locally