Minecraft Blogs / Tutorial

How to make command blocks give enchanted items!

  • 98,258 views, 0 today
  • 10
  • 3
  • 11
Jackeroo's 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

Create an account or sign in to comment.

DragonLord1171
10/11/2017 1:01 pm
Level 5 : Apprentice Miner
DragonLord1171's Avatar
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
GabrielTheDude
01/01/2016 6:06 pm
Level 6 : Apprentice Explorer
GabrielTheDude's Avatar
I'm trying to use this command on a realm and it won't work. Please help.
1
RoboMeister
12/15/2015 4:20 pm
Level 1 : New Engineer
RoboMeister's Avatar
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
Rhombic
01/15/2015 9:00 pm
Level 1 : New Miner
Rhombic's Avatar
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
TrollingTree60
07/14/2014 5:15 pm
Level 1 : New Miner
TrollingTree60's Avatar
YES! I'm making a map :P
1
GamerGeeked
07/02/2014 10:08 am
Level 15 : Journeyman Geek
GamerGeeked's Avatar
Thanks, I needed a lightsaber in my adventure-map
1
GamerGeeked
07/02/2014 10:10 am
Level 15 : Journeyman Geek
GamerGeeked's Avatar
i want data tags
1
TiiMMYz
05/28/2013 4:53 pm
Level 4 : Apprentice Miner
TiiMMYz's Avatar
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
4supervic4
05/12/2013 5:43 am
Level 10 : Journeyman Engineer
4supervic4's Avatar
change your title because it doesno t give you an enchanted item! you have to do it yourself
1
SonicAgent
04/09/2013 1:35 am
Level 7 : Apprentice Dragon
SonicAgent's Avatar
Dude, you are a LEGEND!!!
1

Welcome