Run these from an operator’s chat, a command block, or the server console. Rotate, Swing and Display Entity use newer command/entity features — check they’re available on your Minecraft version.

How to Use the Rotate Command Generator

  1. Pick a mode: Yaw / Pitch (an exact numeric facing), Facing Position (point at a fixed X/Y/Z), or Facing Entity (point at another entity).
  2. Enter a target selector, defaulting to @s (the command’s own executor).
  3. Fill in the fields for your mode – yaw and pitch numbers, an X/Y/Z position, or an entity to face plus an optional eyes/feet anchor.
  4. Copy the generated /rotate command into a command block or function. This is a newer command, so confirm your server/client version supports it before relying on it.

Command Syntax Reference

/rotate <target> <yaw> <pitch>
/rotate <target> facing <x> <y> <z>
/rotate <target> facing entity <target> [eyes|feet]

/rotate instantly turns an entity to face a direction, without any of the smooth turning animation a real mob’s AI would use – it’s a snap, not a rotation-over-time.

Yaw / Pitch sets an exact numeric orientation directly. Yaw is the horizontal facing angle (0 is south in Java Edition’s coordinate convention, and it increases clockwise when viewed from above), and pitch is the vertical tilt (negative values look up, positive values look down, with -90 straight up and 90 straight down).

Facing Position calculates the yaw and pitch needed to look at a specific X/Y/Z coordinate and applies that instead of requiring you to compute the angle yourself – this is the same underlying calculation the more familiar /execute facing subcommand uses for a single command’s execution context, but /rotate makes the resulting orientation permanent for the entity going forward.

Facing Entity points the target at another entity’s current position, continuously recalculated at the moment the command runs (not a persistent tracking lock – running it once orients the entity toward where the other entity was at that instant). The optional anchor argument chooses whether to aim at the faced entity’s eye height or foot position; omitting it defaults to the feet.

Frequently Asked Questions

Is /rotate available in every Minecraft version?

/rotate is a relatively recent addition to Java Edition’s command set. If the command doesn’t run on your server, check that you’re on a recent enough version – older servers won’t recognize it at all, and this tool’s syntax targets the modern command shape described above.

Does /rotate make the entity keep looking at a moving target?

No – Facing Entity mode calculates the direction once, at the moment the command executes, based on the target entity’s position at that instant. To keep tracking a moving entity, you’d need to repeat the command continuously, such as on a repeating command block or inside a function running every tick.

What’s the difference between yaw/pitch values and Facing Position?

Yaw/Pitch requires you to already know or calculate the exact angle you want. Facing Position lets you specify a destination coordinate instead, and the game works out the matching yaw and pitch automatically – much easier when you know where you want the entity to look, but not the angle math to get there.

Does rotating an entity affect its movement or AI behavior?

/rotate only changes the entity’s visual facing direction; it doesn’t move the entity, and for mobs with active AI, their goal selector can still turn them again on a subsequent tick if their behavior calls for it (a hostile mob actively pathing toward a target will keep reorienting itself regardless of a one-time /rotate). It’s most reliable on AI-disabled entities (see the Summon tool’s No AI flag) or non-living entities like item/block/text displays that have no independent facing logic of their own.

Related Tools