mojira.dev
MC-296438

The "display" field on Attribute Modifiers is not optional, despite the changelog saying it is

Basically what the title says: Attribute Modifiers now require the new “display” field despite the changelog claiming it’s optional. This has the potential to break an unthinkable number of commands in people’s datapacks if it remains this way.

Example: The following command works:

/give @s netherite_sword[attribute_modifiers=[{type:"minecraft:attack_damage",amount:7,slot:"mainhand",operation:"add_value",id:"example:test",display:{type:"override",value:{text:" 8 Attack Damage",color:"dark_green"}}}]]

However, this command, which works in the current release (1.21.5), will not parse in this snapshot:

/give @s netherite_sword[attribute_modifiers=[{type:"minecraft:attack_damage",amount:7,slot:"mainhand",operation:"add_value",id:"example:test"}]]

Ideally, this “display” field should be optional and default to {type:"default"}, which would preserve the pre-existing behavior.

Linked issues

Comments 2

Conure512

(Unassigned)

1403243

Community Consensus

Expansion A

Important

Commands

25w15a

25w17a

Retrieved