Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-278181

Bug about "rotate command" and "relative macros"

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 24w45a
    • None
    • Unconfirmed
    • (Unassigned)

      Long story short, I am using the "rotate" command combined with "datapack macros". I am using it to rotate multiple entities to their own relative rotation. The value of macro is "~0.0". This works with "tp" command, but for some reason, it always gives me rotation [0.0f,0.0f]. I'm sending the visual showcase in the attachments. More information about this bug is in the pinned comments.

      What I think is happening:

      The rotate command has problem reading macro data that contains relative rotation "~", if it is used by command "execute on". It does read the value, but it always forgets to use that value with the relative "~".

       

      Edit:

      I think I found the issue. I have command that looks something like this: "execute on passengers run execute as @s at @s run rotate @s ~$(variable_1) ~$(variable)". As you can see in that command, the macro value is located after the "~" symbol. It seems like the command doesn't register the "~" symbol after it is followed by the macro value.

       

      How to recreate this issue?

      Have macro data and use them in the function like this: "rotate @s ~$(macro_1) ~$(macro_2)". Instead of "moving" your rotation based on your current rotation, it should "set" it so it's exact same as in those macros.

      Thank you for your hark work as always!

        1. Datapack.zip
          20 kB
        2. get.mcfunction
          19 kB
        3. put.mcfunction
          5 kB
        4. visual.mp4
          5.56 MB

            Unassigned Unassigned
            MrRedi MrRedi
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: