Denizen Script Commands


Commands are always written with a '-' before them, and are the core component of any script, the primary way to cause things to happen.
Learn about how commands work in The Beginner's Guide.


Showing 1 out of 184 commands...
NameLook
Syntaxlook (<entity>|...) [<location>/cancel/yaw:<yaw> pitch:<pitch>] (duration:<duration>) (offthread_repeat:<#>)
Short DescriptionCauses the NPC or other entity to look at a target location.
Full DescriptionMakes the entity look towards the location.

You can specify either a target location, or a yaw and pitch.

Can be used on players.

If a duration is set, the entity cannot look away from the location until the duration has expired.
Use the cancel argument to end the duration earlier.

Optionally, you can use the "offthread_repeat:" option alongside "yaw:" and "pitch:"
to cause a player's rotation to be smoothed out with a specified number of extra async rotation packets within a single tick.
Related Tags<LocationTag.yaw> Returns the normalized yaw of the object at the location.
<LocationTag.pitch> Returns the pitch of the object at the location.
Usage Example
# Use to point an npc towards a spot.
- look <npc> <player.location>
Usage Example
# Use to force a player to stare at a spot for some time.
- look <player> <npc.location> duration:10s
Synonyms (Search Aid)turn, face
Groupentity
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/entity/LookCommand.java#L46