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

set_fireworks "mode" is required even when "explosions" is optional

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • 1.20.5 Pre-Release 2
    • 24w11a, 1.20.5 Pre-Release 1
    • None
    • Plausible
    • Data Packs
    • Normal
    • Platform

      In the set_fireworks loot item function, the "mode" field is always required, even when it is only used to apply the optional "explosions" lists.

      How to reproduce

      1. Create a data pack with the following item modifier, I expect it to set the flight duration to 2 and keep the explosions the same
        {
          "function": "set_fireworks",
          "flight_duration": 2
        }
        
      2. The item modifier is invalid
      3. Add the "mode" field
        {
          "function": "set_fireworks",
          "mode": "append",
          "flight_duration": 2
        }
        
      4. This makes the item modifier valid again and it behaves as expected. (Internally it appends an empty list of explosions to the existing explosions)

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

              Created:
              Updated:
              Resolved:
              CHK: