Mojira Archive
MC-269415

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

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)

Fixed

[Helper] Misode

[Mojang] Bartosz Bok

2024-03-15, 12:12 AM

2024-04-12, 01:35 PM

2024-04-12, 01:35 PM

3

0

Plausible

Normal

Platform

Data Packs

24w11a, 1.20.5 Pre-Release 1

1.20.5 Pre-Release 2