TransWikia.com

How do I add an enchantment to another item that already has some enchantments?

Arqade Asked by Mek Milan on August 16, 2021

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

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.

Answered by Penguin on August 16, 2021

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.

Answered by RyugaGod on August 16, 2021

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.

Answered by eggohito on August 16, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP