Modify Entity Data (Entity Action Type)

Changes a single piece of an entity's data (e.g.

Changes a single piece of an entity’s data (e.g. whether it has gravity). Works on any entity, not just living ones.

Type ID: apoli:modify_entity_data

Aliases: apoli:set_entity_data and apoli:change_entity_data are plain renames of this action. apoli:set_no_gravity and apoli:set_gravity are shortcuts that pre-fill data: no_gravity, so you only supply (or omit) value.

Fields

FieldTypeDefaultDescription
dataStringWhich property to change (see the list below).
valueBoolean or FloatoptionalThe new value. For a boolean property, omitting value inverts the current state. For a numeric property, omitting value does nothing.

data values

dataTypeProperty
no_gravitybooleanWhether the entity ignores gravity.
invulnerablebooleanWhether the entity is invulnerable.
silentbooleanWhether the entity makes sounds.
glowingbooleanWhether the entity has the glowing outline.
invisiblebooleanWhether the entity is invisible.
custom_name_visiblebooleanWhether the entity’s custom name is always shown.
no_aibooleanDisables AI (mobs only).
fall_distancenumberThe accumulated fall distance.
airnumberRemaining air (in ticks).
fire_ticksnumberRemaining fire (in ticks).

Examples

"entity_action": {
    "type": "apoli:modify_entity_data",
    "data": "no_gravity",
    "value": true
}

This makes the entity ignore gravity. Using the apoli:set_no_gravity alias, the same effect is:

"entity_action": {
   "type":"apoli:set_no_gravity",
   "value":true
}

and omitting value toggles gravity instead.

"entity_action": {
    "type": "apoli:modify_entity_data",
    "data": "fire_ticks",
    "value": 100
}

This sets the entity on fire for 5 seconds.