Summoning based on direction player is facing

Summoning based on direction player is facing - Leadership Lettering Text on Black Background

I'm trying to create a jetpack with the new elytra by summoning in exploding creepers behind you to boost you, but I can only do it in one direction. I'm using this command:

/execute @e[type=Player,name=CheeseTruffles] ~-4 ~ ~ summon Creeper ~ ~ ~ {Fuse:0}

But it only hits you in one spot. Is there anyway to make the summoning location depend on the place you're looking?



Best Answer

Yes, this is possible. You can use the ry and rym selector tags. ry is the maximum horizontal rotation, rym is the minimum. From Gamepedia:

Horizontal rotation values vary from -180.0 (facing due north), to -90.0 (facing due east), to 0.0 (facing due south), to 90.0 (facing due west), to 179.9 (just west of due north) before wrapping back to -180.0 (thus horizontal rotation values increase with rotation to the right, or clockwise viewed from above).

Just include the selector tags in your selector. More info




Pictures about "Summoning based on direction player is facing"

Summoning based on direction player is facing - Leadership Lettering Text on Black Background
Summoning based on direction player is facing - Advice Lettering Text on Black Background
Summoning based on direction player is facing - A Boy Playing Chess



How do you summon something facing a certain direction in Minecraft?

Instructions: Enter the y-rotation and x-rotation of the mob after spawning. Rotation is used to summon a mob facing a specific direction as defined by yRot and xRot. yRot - The y-rotation that the mob is facing in degrees. 0=South, 90=West, 180=North, 270=East.

How do you summon entity where you look?

Press F3 and jot down your X, Y & Z coordinates located on the left. Then type into the chat bar /tp [target player] <x> <y> <z> [<y-rot> <x-rot>] replacing <x> , <y> and <z> with your coordinates you wrote down.

How do you teleport to a certain direction?

The command for summoning is pretty simple. "/summon mob". Players just need to fill in the mob name, though there are a few exceptions. The command remains the same for both Minecraft Java and Bedrock Edition, and is one of the simplest to use.



Minecraft | How to Summon Mobs Facing a Certain Direction in 1.13-1.14.x




More answers regarding summoning based on direction player is facing

Answer 2

You could use /testfor commands with comparators coming out of them that test for players facing in every general direction the player could be looking in. These could be attached to the command blocks you wanted to use.

Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.

Images: Anna Tarazevich, Anna Tarazevich, Anna Tarazevich, Vlada Karpovich