Skip to main content

Modify velocity

saturn:add_velocity

Adds velocity, or replaces it with the given vector.

Runs an operation on a single entity. Used in entity action fields such as entity_action and a trigger rule's action; action arrays run in order.

JSON fields​

FieldTypeRequiredDefaultDescription
typeResource IDyes—saturn:add_velocity
xNumberno0.0X coordinate, offset or vector component, depending on this page's behavior.
yNumberno0.0Y coordinate, offset or vector component, depending on this page's behavior.
zNumberno0.0Z coordinate, offset or vector component, depending on this page's behavior.
spaceEnum stringno"world"Vector coordinate space. Available values: world, local, local_horizontal, local_horizontal_normalized, velocity, velocity_normalized, velocity_horizontal, velocity_horizontal_normalized.
setBooleannofalsetrue replaces the velocity with the given vector; false adds to it.

JSON example​

{
"type": "saturn:add_velocity"
}

This is a value to embed in the corresponding field, not a standalone loadable data pack file. The example: references in the examples must be replaced with defined entries.

Java entry point​

com.iafenvoy.saturn.data.action.builtin.entity.AddVelocityAction. This page is based on the Codec in the current 26.1.2 source.