Minecraft Blogs

How to make command blocks give enchanted items!

  • 9
  • 3
  • 11
avatar Jackeroo
Level 47 : Master Creeper Hugger
5
People often complain that you can't give an item with a command block with an enchantment in it.

But there is a way.

Right, make a command block to give you the item that you want to enchant, so /give @<p,r,a> <item>
Then send more redstone to another command block with the enchant command:
/enchant @<p,r,a> <enchantment ID> <enchantment power>

BEWARE: It only enchants the item your holding.

An enchantment ID Is another name for an enchantment but the name is turned into an number. ID's are used for commands. You can't give people items with a command by the name ONLY the ID.

Well what are the enchantment ID's?

[ID] [type]
0 = protection
1 = Fire protection
2 = feather falling
3 = blast protection
4 = projectile protection
5 = respiration
6 = aqua affinity
7 = thorns
34 = unbreaking
16 = sharpness
17 = smite
18 = bane of athropods
19 = knockback
20 = fire aspect
21 = looting
34 = unbreaking
32 = efficiency
33 = silk touch
34 = unbreaking
35 = fortune
48 = power
49 = punch
50 = flame
51 = infinity

Have fun with your adventure map! (if your making one)
Tags

1
10/11/2017 1:01 pm
Level 3 : Apprentice Miner
DragonLord1171
For those interested the max power level is 32767. For example:

/give @p <name of item> <# of items> 0 {ench:[{id:#,lvl:1-32767}]}
1
01/01/2016 6:06 pm
Level 4 : Apprentice Explorer
GabrielTheDude
I'm trying to use this command on a realm and it won't work. Please help.
1
12/15/2015 4:20 pm
Level 2 : Apprentice Miner
RoboTheMan
I like this. Thanks to this, I've made super-powered diamond swords with Sharpness M (1000), even if M isn't displayed. Well, thanks and Merry Christmas!
1
01/15/2015 9:00 pm
Level 1 : New Miner
Rhombic
In Single Player, with cheats turned on, I make a command block with a stone button on the front for a player to push.  The command block gives the player an item.  For my enchanted Items I use this:

Give Looting III Enchantment Book:
/give @p minecraft:enchanted_book 1 0 {StoredEnchantments:[{id:21,lvl:3}]}


Give Diamond Sword with Looting III Enchantment:
/give @p minecraft:diamond_sword 1 0 {ench:[{id:21,lvl:3}]}


Give Diamond Sword with Looting III and Fire Aspect III Enchantment:
/give @p minecraft:diamond_sword 1 0 {ench:[{id:21,lvl:3},{id:20,lvl:3}]}

You will notice the book uses "StoredEnchantments" while the item uses "ench"

I use several command blocks to give plain items, or to enchant the item in the player's hand:
/enchant @p silk_touch
which will enchant the item that the player is holding with Silk Touch.
1
07/14/2014 5:15 pm
Level 1 : New Miner
TrollingTree60
YES! I'm making a map :P
1
07/02/2014 10:08 am
Level 23 : Expert Nerd
GamerGeekedSB
Thanks, I needed a lightsaber in my adventure-map
1
07/02/2014 10:10 am
Level 23 : Expert Nerd
GamerGeekedSB
i want data tags
1
05/28/2013 4:53 pm
Level 4 : Apprentice Miner
TiiMMYz
Hey, just wondering. Is there a way to set the focus on the hotbar? As if you give the player, say... a bow, and the player has their hotbar set on number 7, the item wont be enchanted...
1
05/12/2013 5:43 am
Level 10 : Journeyman Engineer
4supervic4
change your title because it doesno t give you an enchanted item! you have to do it yourself
1
04/09/2013 1:35 am
Level 6 : Apprentice Dragon
SonicAgent
Dude, you are a LEGEND!!!
1
03/16/2013 2:37 am
Level 11 : Journeyman Miner
FxEvolution
Thx Man!
Planet Minecraft Logo

Website

© 2010 - 2020
www.planetminecraft.com

Welcome