-
Bug
-
Resolution: Unresolved
-
None
-
1.21.1, 24w39a
-
None
-
Confirmed
-
Data Packs, Enchantments
-
Low
-
Platform
Creating a custom enchantment that modifies generic.armor should be restricted by slot, e.g. chest, but still works even when equipped to a different slot, e.g. feet.
"minecraft:attributes": [
{
"amount": {
"type": "minecraft:linear",
"base": 1.0,
"per_level_above_first": 1.0
},
"attribute": "minecraft:generic.armor",
"id": "ifiht:enchantment.solar_aegis",
"operation": "add_value",
"slot": "chest"
}
]
working test datapack zip attached.
How to reproduce:
- Join a new world with the attached data pack enabled.
- Execute the following command:
/give @s golden_boots[enchantments={levels:{'ifiht:solar_aegis':1}}] - Equip the boots you were given.
Expected result:
Golden boots with the enchantment would only provide +1 armor total, since the enchantment only affects items worn in the chest slot.
Observed result:
Golden boots with the enchantment add a total of +2 armor points to the player, even though the enchantment only applies the generic.armor boost to the chest slot.