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

    • Icon: Bug Bug
    • Resolution: Fixed
    • 20w49a
    • 1.16.3, 20w45a
    • None
    • Confirmed
    • (Unassigned)

      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

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

              Created:
              Updated:
              Resolved:
              CHK: