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

Function command returns wrong number of commands executed for embedded functions

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: Minecraft 1.14 Pre-Release 4, 1.15 Pre-release 1, 1.15 Pre-Release 2, 1.15 Pre-release 3, 1.15 Pre-release 4, 1.15 Pre-release 5, 1.15 Pre-release 6, 1.15 Pre-release 7, 1.15, 1.15.1, 1.15.1 Pre-release 1, 1.15.2, 20w08a, 20w13b, 20w14a, 20w15a, 20w16a, 20w17a, 20w18a, 1.16 Pre-release 7
    • Fix Version/s: None
    • Labels:
    • Confirmation Status:
      Community Consensus
    • Category:
      Commands

      Description

      As the title says, Function command returns wrong number of commands executed for embedded functions.

      As far as I see, this wrong number of command is considered by the maxCommandChainLength game rule.

      A data pack to replicate this issue is available in the attachment section here. (dp.zip)

      Example: Given two functions:

      liach:output

      function liach:output/do
      

      liach:output/do

      say Expected to have 2 commands ran in the function liach:output
      

      Execution result of liach:output (Looks wrong)

      [liach] Expected to have 2 commands ran in the function liach:output
      Executed 3 commands from function 'liach:output'
      

      Execution result of liach:output/do (Looks right)

      [liach] Expected to have 2 commands ran in the function liach:output
      Executed 1 commands from function 'liach:output/do'
      

      What I expect for execution result of liach:output

      [liach] Expected to have 2 commands ran in the function liach:output
      Executed 2 commands from function 'liach:output'
      

      The data pack containing these 2 functions is attached below (note that there is a few unrelated functions for testing other bugs)

      I am working on a solution that fixes this bug, MC-143266, MC-143269, and MC-126946 at the same time. Will update when I get progress.

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            liach liach
            Votes:
            6 Vote for this issue
            Watchers:
            6 Start watching this issue

              Dates

              Created:
              Updated:
              CHK: