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
    Jul 28 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
    Jul 28 at 14:25
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. Jul 28 at 19:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.