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

Optional function tags sometimes don't run even when the tag exists

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Fixed
    • Affects Version/s: 1.16.3, 20w45a
    • Fix Version/s: 20w49a
    • Labels:
      None
    • Confirmation Status:
      Confirmed
    • Category:
      (Unassigned)

      Description

      The bug

      When function tags are in a particular configuration, certain functions don't run when you would expect them to. I attached a data pack with the least amount of files needed to reproduce. This configuration has 2 function tags and 2 functions. When loaded it is expected to print two messages in chat, however the observed behavior is that only b:load runs.

      #minecraft:load
        -> #c:a
             -> a:load "say load A"
        -> b:load "say load B"
      

      It depends on the names of the tags and functions whether or not the bug will happen!
      For example, renaming #c:a to either #c:load, #minecraft:a or #a:load will not cause this bug!

      Files

      #minecraft:load
      {
          "values": [
              {"id": "#c:a", "required": false},
              "b:load"
          ]
      }
      #c:a
      {
          "values": [
              "a:load"
          ]
      }
      a:load
      say load A
      b:load
      say load B

      How to reproduce

      1. Download the attached data pack mc-201840.zip and install it in a world
      2. Run /reload
      3. Observe that only "load B" is printed
      4. Do one of the following actions
        • Replace "required": false with "required": true
        • Rename #c:a to #c:load (and update reference in #minecraft:load
      5. Observe that both "load A" and "load B" are printed

        Attachments

          Activity

            People

            Assignee:
            boq [Mojang] Bartosz Bok
            Reporter:
            Misoloo [Helper] Misode
            Votes:
            8 Vote for this issue
            Watchers:
            7 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              CHK: