1

Command Help!

BallisticGhoul •11/6/23 5:35 pm
•
232
•
11/8/2023 11:35 am
Recently I've been working on a datapack for me and my friends on our private Minecraft server. The idea is simple enough; I want a command that will summon a Wither Skull in the direction I'm looking, and make it move in that direction. However, the command I wrote doesn't seem to be working...
Any Help would be much appreciated :D

BTW my current command is below and I'm in 1.20.1

/execute at @p anchored eyes run summon minecraft:wither_skull ~ ~ ~ {direction:[0.0,0.0,0.0]}

/execute as @e[type=minecraft:wither_skull] at @s run data modify entity @s Motion set from entity @p Pos

Also I'll sub you if you can help me, I'll credit you to my friends as well :)
Posted by
BallisticGhoul
Level 30 : Artisan Nerd Loremaster
51

  Have something to say?

Join • Sign in

6

imalittlhigh
• 11/07/2023 6:28 am
• Level 67 : High Grandmaster Sweetheart Stack
/execute as @e[type=minecraft:wither_skull] at @s run data modify entity @s Motion set from entity @p Pos

pretty sure this doesnt work. Pos is the xyz coords of your position. You are trying to set them as the motion of the skull [3D Vector].

If you want the skull to fly in the dir youre looking at, you would need to calculate the values you need in direction vector for the skull from the rotation of the player.
Doing that isnt rly easy and not a one command thing.
I have found a youtube video where the dude did what you want to do: https://www.youtube.com/watch?v=DaIvJwhcz8Q

Hope that helps ^^
2
BallisticGhoul
• 11/08/2023 11:35 am
He/Him • Level 30 : Artisan Nerd Loremaster
Thanks so much! That was super helpful!
1
BallisticGhoul
• 11/07/2023 11:47 am
He/Him • Level 30 : Artisan Nerd Loremaster
wow thanks!
2
TheSciFi
• 11/06/2023 6:24 pm
• Level 25 : Expert Artist
Is the problem that it’s not summoning or it’s not moving?
2
TheSciFi
• 11/06/2023 6:26 pm
• Level 25 : Expert Artist
If it’s not summoning, it might be because of your @p selector in the first command.
1
BallisticGhoul
• 11/07/2023 11:47 am
He/Him • Level 30 : Artisan Nerd Loremaster
It isn't moving.
1

Welcome