Name | <LocationTag.ray_trace_target[(range=<#.#>/{200});(blocks=<{true}/false>);(fluids=<true/{false}>);(nonsolids=<true/{false}>);(entities=<matcher>);(ignore=<entity>|...);(raysize=<#.#>/{0})]> |
Returns | EntityTag |
Description | Traces a line from this location towards the direction it's facing, returning the first hit entity (if any).
This is similar to LocationTag.precise_target and PlayerTag.target, except offering more options for how the ray trace is performed. For ray tracing locations, see LocationTag.ray_trace. Optionally specify: range: (defaults to 200) a maximum distance (in blocks) to trace before giving up. blocks: (defaults to true) specify "false" to ignore all blocks, solid or nonsolid or fluid, between this location and the target entity. fluids: (defaults to false) specify "true" to count fluids like water as solid, or "false" to ignore them. nonsolids: (defaults to false) specify "true" to count passable blocks (like tall_grass) as solid, or "false" to ignore them. entities: (defaults to none) specify an entity matcher for entities to ray trace for. Any non-matching entities along the way are ignored. Leave blank to match any entity. ignore: (defaults to none) optional list of EntityTags to ignore even if they match the matcher. raysize: (defaults to 0) sets the radius of the ray being used to trace entities. |
Example |
|
Example |
|
Example |
|
Synonyms (Search Aid) | locationtag.raycast_target, locationtag.raytrace_target, locationtag.ray_cast_target |
Group | world |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/LocationTag.java#L1824 |