Changing the number of armor using an Attribute Modifier for generic.armor does not work.
If you make the number greater or lesser than any real armor number in the game, the armor won't function properly. Any armor with valid armor points will function correctly and properly add points to the bar and defense, but if you equip 2 invalid pieces, then the one that was equipped will "overwrite" the other piece. Basically, removing the defense from the first piece equipped and replacing with the armor you equipped.
This needs to be fixed otherwise this function is pointless and should just be removed
Comments 5
Unless I can't read, no. The armor pieces (the defense bar above health) does not go up correctly if any given armor is using a +# type that any armor in the game does not use. If I equipped an Iron Chestplate with +7 defense, and Leather Boots with +4 defense, only the boots will work. They don't stack up, I'm not entirely sure about Effects since I have not tried using that yet (But I do plan to do that eventually)
Cannot reproduce. I used the commands
/give @s iron_boots{AttributeModifiers:[{AttributeName:"generic.armor",Name:"generic.armor",Amount:4,Operation:0,UUIDMost:11111,UUIDLeast:11111}]}
and
/give @s iron_helmet{AttributeModifiers:[{AttributeName:"generic.armor",Name:"generic.armor",Amount:8.0,Operation:0,UUIDMost:22222,UUIDLeast:22222}]}
to get the items. When wearing both armor peaces at once, the effect correctly stacked.
Sorry for the long wait for me to answer, anyways I don't get why? When I tried it would just stack incorrectly and deplete the points instead of increase, so I don't know what to say
Does MC-16466 describe your issue?