mojira.dev
MC-137550

Can't alter/add enchantments through /data

To reproduce:

  • Drop a sword close by

  • execute

/data merge entity @e[distance=..3,limit=1,type=item] {Item:{Enchantments:[{lvl:1,id:"minecraft:sharpness"}]}}
  • ->chat says "modified data of sword"

  • nbt stays unchanged

i've already tried f.ex. making an armorstand invisible, that worked though.

also giving yourself a sword with the same nbt (without Item:{} obviously) works as well

Comments 2

wow thats.. embarassing for someone that has been working with commandblocks for 3 years..

SlaxX

(Unassigned)

Unconfirmed

Minecraft 18w43a, Minecraft 18w43b

Retrieved