mojira.dev
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
    }
    {
      "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
    }
    {
      "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)

Comments 0

No comments.

Misode

boq

Plausible

Platform

Normal

Data Packs

24w11a, 1.20.5 Pre-Release 1

1.20.5 Pre-Release 2

Retrieved