Skip to main content

Relative rotation

saturn:relative_rotation

Compares the rotation difference between the actor and the target on the given axes.

Checks the relationship between the actor and the target. Swapping the two sides changes the meaning of some conditions.

JSON fields​

FieldTypeRequiredDefaultDescription
typeResource IDyes—saturn:relative_rotation
axisArray of enum stringsno["x","y","z"]Rotation axes included in the calculation. Available values: x, y, z.
actor_rotationEnum stringno"head"Whether the actor uses head or body rotation. Available values: head, body.
target_rotationEnum stringno"body"Whether the target uses head or body rotation. Available values: head, body.
comparisonEnum stringyes—One of ==, !=, <, <=, >, >=.
compare_toNumberyes—The target number to compare against.

JSON example​

{
"type": "saturn:relative_rotation",
"comparison": ">=",
"compare_to": 1
}

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.condition.builtin.bientity.RelativeRotationCondition. This page is based on the Codec in the current 26.1.2 source.