0

I have a pickaxe with the enchantments Fortune I and Unbreaking I. I would like to add another enchantment, Mending, onto this pickaxe, without disturbing the other enchantments.

I think that the /data modify command will help me accomplish this. How can I do this?

3 Answers 3

1

Use /enchant:

/enchant @s minecraft:mending

No where does it say in the wiki doubling up on /enchant won't work and I know it does in Bedrock, so it should still work.

0

You can append an enchantment to the item using the /data modify command, but you would need to throw the item outside your inventory or put it inside a container block, since it's not possible to modify player data. (There is a work-around, but it's rather complicated) Here's are some examples:

For targeting the item entity:

data modify entity <targetEntity> Item.tag.Enchantments append value {id: "minecraft:mending", lvl: 1s}
  • <targetEntity> refers to the item entity that we'll be modifying the NBT of.
  • Item.tag.Enchantments is the NBT path for the enchantments of an item. We'll be appending an object in this list.
  • append value indicates that the data after will be appended to the target NBT path, which in this case, is Item.tag.Enchantments
  • {id: "minecraft:mending", lvl: 1s} is the mending enchantment we'll be appending to the Item.tag.Enchantments list

For targeting a container block that contains the item:

data modify block x y z Items[].tag.Enchantments append value {id: "minecraft:mending", lvl: 1s}
  • x, y, and z refers to the container block's coordinates. In this example, let's say the block is a chest.
  • Items[].tag.Enchantments is the NBT path to the item that's stored in the chest. Items[] refers to the chest's NBT, which is used for storing items. You can select a certain index by adding a number inside [].
    e.g: Items[0].tag.Enchantments would target the item in the first slot of the chest, like Items[-1].tag.Enchantments would target the item in the last slot of the chest.
-1

If you wish to do this, get a book with the mending enchant and use an anvil to do it. If you don't want to go through all that pain, then hold the pickaxe on your had, and type /enchant @p minecraft:mending.

Although if you want that book, it is best to find a village, make 2 fletching tables, and find a nitwit and place and break the fletching table until you get a mending trade. then trade with another villager for emeralds and get that mending book. Or you could try and get mending on a book through an enchantment table.

All the best and hope this helped.

2
  • this wont work, since you cant put mending and unbreaking on one pick in an anvil
    – Topcode
    Apr 1, 2021 at 12:46
  • I tried it in both 1.8.8 and 1.16.5 and it worked! I commented after checking. So idk what u are talking about. And, Yes you can put unbreaking and mending on 1 pick in an anvil. Asking more precisely, which part of my solution won't work?
    – RyugaGod
    Apr 1, 2021 at 14:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .