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

    • Bug
    • Status: Resolved
    • Resolution: Fixed
    • 20w22a
    • 1.16 Pre-release 1
    • None
    • Confirmed
    • Data Packs
    • 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

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

              Dates

                Created:
                Updated:
                Resolved:
                CHK: