4

I'm recreating the Donkey Kong arcade game in Minecraft, and I want Kong to be facing a certain way the whole time, so I put this command in a repeating command block:

/execute as @e[name="Donkey Kong"] run data modify entity @s {Rotation: [180d, 0d]}

It does nothing; it doesn't even spit out an error message.

2
  • Welcome to arqade.se! Take the tour and read the help center if in need of guidance.
    – Zoma
    Commented Jul 28, 2021 at 7:20
  • Modifying nbt data of entities is finicky due to the functionality of how that works. You're essentially replacing that entity with a new one instead of simply updating those fields. I imagine that might be part of the issue.
    – Regnegade
    Commented Jul 28, 2021 at 14:25

2 Answers 2

2

I don't know why your command didn't work. I tried:

/execute as @e[name="Donkey Kong"] run data modify entity @s {Rotation: [180f, 0f]}

...but that didn't work either.

I know of a workaround using the /tp command:

/execute as @e[name="Donkey Kong"] at @s run tp @s ~ ~ ~ 180 0
1
  • 2
    The command doesn't work because they were attempting to merge but used /data modify.
    – One 2 Many
    Commented Jul 28, 2021 at 19:39
0

Try typing this:

/execute as @e[name="Donkey Kong"] at @s run data merge entity @s {Rotation:[180.0f,0.0f]}
1
  • This would be a better answer if you explained how the command you provided answers the question rather than merely tossing readers a fish.
    – pppery
    Commented Jul 7, 2022 at 13:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .