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

Minecraft fails to execute commmands with multiple spaces between their arguments in .mcfunction files

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Works As Intended
    • Affects Version/s: Minecraft 1.12
    • Fix Version/s: None
    • Environment:
      Java: 1.8.0_25 64bit
    • Confirmation Status:
      Unconfirmed

      Description

      Commands with extra spaces between their arguments will not be executed by Minecraft via .mcfunction-files even though they will be executed just fine when triggered via the ingame CLI. Furthermore Minecraft wrongly reports that it executed those commands. This seems to apply to any command with multiple spaces between any of its arguments.

      Steps to reproduce:

      1. Create a .mcfunction-file
      2. put
        summon minecraft:armor_stand -1 64 0
        

        into line 1

      3. put
        summon minecraft:armor_stand 0  64 0
        

        into line 2 (note the extra space between 0 and 64)

      4. save the file (duh!)
      5. /function example:file_you_just_saved
      6. See only the first armor stand being summoned and Minecraft wrongly reporting it executed two commands from the .mcfunction file

      Appendum

      While I was made aware that commands with extra spaces don't work in Command Blocks either, I still consider this behaviour disfunctional. Almost every single compiler/interpreter out there doesn't care about tab stops or extra spaces (and neither do any other minecraft data files) because the alternative makes it almost impossible to write easy to read and properly aligned code. It's a usability issue.

        Attachments

        1. summon_nope.jpg
          454 kB
          haschischtasche
        2. summon_ok.jpg
          456 kB
          haschischtasche

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              haschischtasche haschischtasche
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: