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

'requirements' field can no longer be skipped in advancements

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • 1.20.2 Pre-release 1
    • 23w35a
    • None
    • Confirmed
    • Advancements, Data Packs
    • Important
    • Platform

      Prior to 23w35a, the 'requirements' field could be skipped in advancement json files. Starting from 23w35a, this is no longer possible as the game stopped automatically assigning advancement criteria to the requirements if the field for it is not present.

      I have attached an example datapack in 'BugReport.zip' with a singular advancement - 'bugreport:advancement', granted on tick. It does not have a 'requirements' field. There is also 'BugReport_23w35a.zip', with the only difference between both of these being the 'requirements' field being present in the advancement of the latter pack.

      Expected Behavior

      Loading the pack 'BugReport.zip'on a world in 23w33a or prior works with no issues. The advancement is granted upon joining.

      'BugReport_23w35a.zip' also works as intended.

      Actual Behavior

      In 23w35a, the pack 'BugReport.zip' loads, but the advancement fails to parse, printing the following error message in the game logs:

      Parsing error loading custom advancement bugreport:advancement: Advancement completion requirements did not exactly match specified criteria. Missing: [requirement]. Unknown: []

      However, if instead 'BugReport_23w35a' is loaded, the advancement parses as it should, without any error messages in the logs, and is granted immediately on the next tick.

            gegy1000 [Mojang] Gegy
            kohara kohara
            Votes:
            12 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: