Skip to main content

Ray target

saturn:ray

Selects entities near a ray along the user's facing direction.

Used in an ability's target_selector. After the selector has gathered candidates, the ability still checks target_condition.

JSON fields​

FieldTypeRequiredDefaultDescription
typeResource IDyes—saturn:ray
lengthNumber provideryes—Length of the selection range, in blocks.
radiusNumber providerno0.5Radius in blocks; in a resource bar it is in pixels.
include_actorBooleannofalseWhether to include the actor themselves as a candidate target.
limitIntegerno0Upper limit on the number of targets; 0 means no limit here.
orderEnum stringno"nearest"nearest, farthest or random. Available values: nearest, farthest, random.

JSON example​

{
"type": "saturn:ray",
"length": 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.ability.target.RayTargetSelector. This page is based on the Codec in the current 26.1.2 source.