mojira.dev
MC-111466

Giving armor with different protection only adds generic protection

When using /give or other commands to give armor with blast or fire protection enchantments, the armor has generic protection instead. Regular enchantments were obtained using /enchant command. All enchants were done with diamond armor.
Exact commands used

/replaceitem entity @p slot.armor.head minecraft:diamond_helmet 1 0 {ench:[{id:"minecraft:fire_protection",lvl:4}],display:{Name:"Fire Protection"}}
/replaceitem entity @p slot.armor.chest minecraft:diamond_chestplate 1 0 {ench:[{id:"minecraft:fire_protection",lvl:4}],display:{Name:"Fire Protection"}}
/replaceitem entity @p slot.armor.legs minecraft:diamond_leggings 1 0 {ench:[{id:"minecraft:fire_protection",lvl:4}],display:{Name:"Fire Protection"}}
/replaceitem entity @p slot.armor.feet minecraft:diamond_boots 1 0 {ench:[{id:"minecraft:fire_protection",lvl:4}],display:{Name:"Fire Protection"}}
/replaceitem entity @p slot.armor.head minecraft:diamond_helmet 1 0 {ench:[{id:"minecraft:blast_protection",lvl:4}],display:{Name:"Blast Protection"}}
/replaceitem entity @p slot.armor.chest minecraft:diamond_chestplate 1 0 {ench:[{id:"minecraft:blast_protection",lvl:4}],display:{Name:"Blast Protection"}}
/replaceitem entity @p slot.armor.legs minecraft:diamond_leggings 1 0 {ench:[{id:"minecraft:blast_protection",lvl:4}],display:{Name:"Blast Protection"}}
/replaceitem entity @p slot.armor.feet minecraft:diamond_boots 1 0 {ench:[{id:"minecraft:blast_protection",lvl:4}],display:{Name:"Blast Protection"}}

Linked issues

Comments 5

Enchantments still use numerical ids.

I changed the enchantments to their numerical ids and the enchantments still do not get anything but protection.

Define them as a short (1s, 2s, 3s, etc.)

I realized that afterwards. Anytime the number is a string it will always give protection.

See MC-61041 and @unknown's comment.

mukster z

(Unassigned)

Unconfirmed

Minecraft 16w50a

Retrieved