-
Notifications
You must be signed in to change notification settings - Fork 1
Entity Modifiers
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.
Sets the absorption of a living entity.
absorption: A number provider. Specifies the absorption to set.
add: An optional boolean. If true, change will be relative to the current absorption.
{
"function": "minecraft:set_absorption",
"absorption": 5.0,
"add": true
}Sets the air time of an entity.
time: A number provider. Specifies the air time to set.
add: An optional boolean. If true, change will be relative to the current air time.
{
"function": "minecraft:set_air_time",
"time": 5,
"add": true
}Sets the custom name of an entity.
name: A text component. Advanced components are resolved using the entity that is being modified.
visible: An optional boolean. Specifies if the name should be visible or not.
{
"function": "minecraft:set_custom_name",
"name": {
"text": "Hello There!",
"color": "blue"
},
"visible": true
}Sets the fire time of an entity.
time: A number provider. Specifies the fire time to set.
add: An optional boolean. If true, change will be relative to the current fire time.
{
"function": "minecraft:set_fire_time",
"time": 5,
"add": true
}Sets the health of a living entity.
health: A number provider. Specifies the health to set.
add: An optional boolean. If true, change will be relative to the current health.
{
"function": "minecraft:set_health",
"health": 5.0,
"add": true
}Sets the hunger of a player.
hunger: A number provider. Specifies the hunger to set.
add: An optional boolean. If true, change will be relative to the current hunger.
{
"function": "minecraft:set_hunger",
"hunger": 5,
"add": true
}Sets the invulnerability of an entity.
invulnerable: A boolean. If true, the entity won't take any damage.
{
"function": "minecraft:set_invulnerable",
"invulnerable": true
}Sets the position of an entity.
potition: A position provider. Specifies the position to set.
{
"function": "minecraft:set_position",
"position": {
"type": "minecraft:world",
"x": 10.0,
"y": 64.0,
"z": 150.0
}
}Sets the rotation of an entity.
rotation: A rotation provider. Specifies the rotation to set.
{
"function": "minecraft:set_rotation",
"rotation": {
"x": 10.0,
"y": 45.0
}
}Sets the saturation of a player.
saturation: A number provider. Specifies the saturation to set.
add: An optional boolean. If true, change will be relative to the current saturation.
{
"function": "minecraft:set_saturation",
"saturation": 5.0,
"add": true
}