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

No warning message when function is terminated because of maxCommandChainLength gamerule

XMLWordPrintable

    • Unconfirmed

      The bug

      When a function is terminated because the maxCommandChainLength gamerule value is reached no warning is printed to the log. For command blocks a warning is printed.

      An error message is needed since terminating a function during its execution will likely cause undefined behavior.

      How to reproduce

      1. Download the attached file MC-124446 datapack.zip and place it in the datapacks folder of your world
      2. Make sure the value for maxCommandChainLength is at least 2
        /gamerule maxCommandChainLength 2
        
      3. Use the following command to verify that the function is working
        /function custom:test
        

        It runs two commands

      4. Set the value for maxCommandChainLength to 1
        /gamerule maxCommandChainLength 2
        
      5. Run the function again
        /function custom:test
        

        It runs one command

      6. Look at the log
        No warning was logged

            dinnerbone [Mojang] Nathan Adams
            marcono1234 Marcono1234
            Votes:
            3 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: