mojira.dev
MC-269482

The set_attributes function in loot tables no longer replaces default attribute modifiers

When creating a loot table in a data pack that uses the function minecraft:set_attributes, the custom attributes are added to the item in addition to the default vanilla attributes. This is different to how it functioned before in 1.20.4 where the custom attributes would replace the default ones.

 

Reproduction steps:
Load the provided data pack with the loot table in a new world.

/datapack enable "file/set_attribute_bug_demo"

Then run the command.
/loot give @s loot minecraft:diamond_sword

 

What should happen:
You get a sword with only +14 attack damage.
What actually happens:
You get a sword with +14 attack damage with the default modifiers still present.

[media]

Attachments

Comments 0

No comments.

Javitar

gegy

Confirmed

Platform

Important

Data Packs, Loot tables

24w11a

24w14a

Retrieved