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

Functions load before entity tags do, causing loading errors.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Fixed
    • Affects Version/s: 20w22a
    • Fix Version/s: 1.16 Pre-release 1
    • Labels:
      None
    • Confirmation Status:
      Confirmed
    • Category:
      Data Packs
    • Mojang Priority:
      Very Important

      Description

      The bug

      Functions in data packs now load before entity tags. This causes errors when loading a data pack for the first time.

      To reproduce:

      1. Download the attached datapack Bug Datapack.zip and place in the world file.
      2. /reload
        There is an error in the log stating there was an invalid entity.
        Failed to load function bug:error
        java.util.concurrent.CompletionException: java.lang.IllegalArgumentException: Whilst parsing command on line 1: Invalid or unknown entity type 'bug:cat' at position 12: ...y @e[type=<--[HERE]
        	...
        Caused by: java.lang.IllegalArgumentException: Whilst parsing command on line 1: Invalid or unknown entity type 'bug:cat' at position 12: ...y @e[type=<--[HERE]
        	...
        
      3. /reload one more time, and see that the error doesn't appear.

      From this, we can conclude that the function is loading before the tag, as if the tag was invalid, it would be invalid in the function the second time. However, the second time it is not invalid, so therefore it must have been loaded.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              boq [Mojang] Bartosz Bok
              Reporter:
              CreeperMagnet_ CreeperMagnet_
              Votes:
              19 Vote for this issue
              Watchers:
              14 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                CHK: