Jump to content

  • Curse Sites
Become a Premium Member! Help
Latest News Article

Giving Enchanted Items Thru Command Blocks

giving encahnted items through command blocks how to enchanted

  • This topic is locked This topic is locked
37 replies to this topic

#1

EnderArms

Posted 26 November 2012 - 05:34 AM

Since a lot of people are asking this, i thought this might help.

To give enchanted items through command blocks, you must place the activator and connect it to 2 command blocks. On one of the command blocks, set it back by 1 with a redstone repeater and type in the set-back one "Enchant @p [Enchantment ID] [Level]". Then, in the one without the repeater, type /give @p [Item that is going to be enchanted] [Amount]. Then, you're done!

A video tutorial - (Please support my channel by subscribing Posted Image)
Spoiler:

I hope this helps!
Posted Image

Register or log in to remove.

#2

EnderArms

Posted 28 November 2012 - 08:31 AM

wow not many replies as my previous
Posted Image

#3

aminecraftguy00
  • Minecraft: aminecraftguy00

Posted 28 November 2012 - 08:55 AM

This should have more attention. Good tutorial! I might use it for this map I'm making with a friend.
To all of you people who think Notch is still working on the game, he stopped working on Minecraft in late 2011. Get your facts straight and stop spamming his twitter about Minecraft updates.

#4

FrostedBirdz
  • Location: United States
  • Minecraft: FrostedBirdz
  • Xbox:FrostByte

Posted 28 November 2012 - 10:39 AM

Correct me if I'm wrong, but It looks like that enchants the item on the selected slot on the quick access bar. If so then If your highlighted slot isn't the slot that the enchanted tool will be on, then nothing will be selected, and if it is full, then the tool cannot be enchanted, and the wrong item has a possibility of becoming enchanted. Just wanted to throw this out.

I know my videos aren't great, but if you like them, I would appreciate it if you could click subscribe.

#5

TheMightyAnonym
  • Location: Somewheeeere over the rainbow waaay uuup hiiigh~!
  • Minecraft: TheMightyAnonym

Posted 28 November 2012 - 04:08 PM

^Indeed. However, there is currently no way (as far as I have seen) to give a pre-enchanted item, or enchant specific items in a player's inventory.

3 things I want with command blocks:
  • Scripting (multiple commands per block, flags, etc)
  • placing items in specific inventory slots.
  • More parameters for /give, to the extent of NBT tags.
Until then, you'll have to make do with this or dispensers.
Posted Image

#6

NarWhat
    NarWhat

    Iron Miner

  • Members
  • 338 posts
  • Location: [REDACTED]
  • Minecraft: tratiikxt1t4n
  • PSN:NarWhatGaming

Posted 28 November 2012 - 05:51 PM

View PostTheMightyAnonym, on 28 November 2012 - 04:08 PM, said:

^Indeed. However, there is currently no way (as far as I have seen) to give a pre-enchanted item, or enchant specific items in a player's inventory.

3 things I want with command blocks:
  • Scripting (multiple commands per block, flags, etc)

  • placing items in specific inventory slots.

  • More parameters for /give, to the extent of NBT tags.
Until then, you'll have to make do with this or dispensers.
it IS possible! Using the /give command [I think...] you can use /give @p 276 1 [enchantment]:[level]
or am I thinking of Bukkit's /i command...
If you need any help with any computer issues, check my website for contact information.  I also do Minecraft Mods... well basic ones, I can make blocks that do specific things.  I've also dabbed into making Plugins... like before, simple plugins :)

#7

Skylinerw
    Skylinerw

    Sectional Moderator

  • Sectional Moderator
  • 3595 posts

Posted 28 November 2012 - 06:02 PM

View Post123386761, on 28 November 2012 - 05:51 PM, said:

it IS possible! Using the /give command [I think...] you can use /give @p 276 1 [enchantment]:[level]
or am I thinking of Bukkit's /i command...

You're thinking of Bukkit. After the quantity comes the damage value in vanilla, not enchantment.

#8

EnderArms

Posted 29 November 2012 - 12:09 AM

View PostTheMightyAnonym, on 28 November 2012 - 04:08 PM, said:

^Indeed. However, there is currently no way (as far as I have seen) to give a pre-enchanted item, or enchant specific items in a player's inventory.

3 things I want with command blocks:
  • Scripting (multiple commands per block, flags, etc)

  • placing items in specific inventory slots.

  • More parameters for /give, to the extent of NBT tags.
Until then, you'll have to make do with this or dispensers.
A solution could be to give them 9 of the item then one of them will have to be enchanted, right?
Posted Image

#9

nyancat26
  • Location: Brazil
  • Minecraft: nyancat26

Posted 29 November 2012 - 12:27 AM

View PostEnderArms, on 29 November 2012 - 12:09 AM, said:


A solution could be to give them 9 of the item then one of them will have to be enchanted, right?

That is, if nothing else was on the quick bar. Also, then you'd have to get rid of 8 items

#10

FrostedBirdz
  • Location: United States
  • Minecraft: FrostedBirdz
  • Xbox:FrostByte

Posted 29 November 2012 - 12:40 AM

View PostEnderArms, on 29 November 2012 - 12:09 AM, said:

A solution could be to give them 9 of the item then one of them will have to be enchanted, right?
Your better off just using dispensers for now to be honest, at least until the command /give gets some improvements.

I know my videos aren't great, but if you like them, I would appreciate it if you could click subscribe.

#11

Skylinerw
    Skylinerw

    Sectional Moderator

  • Sectional Moderator
  • 3595 posts

Posted 29 November 2012 - 04:10 AM

View Postnyancat26, on 29 November 2012 - 12:27 AM, said:

That is, if nothing else was on the quick bar. Also, then you'd have to get rid of 8 items

Not only that, one of the ones taken away could very well be the one enchanted, leaving the player with an unenchanted item. Or, should they be carrying one of the same item, could be taken away as well.

#12

EnderArms

Posted 30 November 2012 - 05:39 AM

View Postnyancat26, on 29 November 2012 - 12:27 AM, said:

That is, if nothing else was on the quick bar. Also, then you'd have to get rid of 8 items
well my point is if its a minigame they shouldnt have any items in the first place
or you can do /clear @p to remove their inv.
Posted Image

#13

BladeOfShadowsX

Posted 01 December 2012 - 07:05 AM

Does anyone know how to give potions through command blocks?  It seems to only let you spawn in water bottles with them.  I know this is a topic on enchanted items, but i figured you guys might know.

#14

Skylinerw
    Skylinerw

    Sectional Moderator

  • Sectional Moderator
  • 3595 posts

Posted 01 December 2012 - 08:26 AM

View PostBladeOfShadowsX, on 01 December 2012 - 07:05 AM, said:

Does anyone know how to give potions through command blocks?  It seems to only let you spawn in water bottles with them.  I know this is a topic on enchanted items, but i figured you guys might know.

Potions use damage values, which you can find on the wiki (listed on the tables as DV):

http://www.minecraft...et/wiki/Potions

In the give command:

/give [player] [item ID] [item quantity] [damage value]

/give @p 373 1 8193

The above would, for example, provide a regeneration potion. Note that this doesn't apply a potion effect, just puts the potion into the players inventory (though I'm still rooting for the day that we may hopefully be able to apply potion effects directly via command block!)

#15

EnderArms

Posted 02 December 2012 - 12:32 AM

View PostSkylinerw, on 01 December 2012 - 08:26 AM, said:

Potions use damage values, which you can find on the wiki (listed on the tables as DV):

http://www.minecraft...et/wiki/Potions

In the give command:

/give [player] [item ID] [item quantity] [damage value]

/give @p 373 1 8193

The above would, for example, provide a regeneration potion. Note that this doesn't apply a potion effect, just puts the potion into the players inventory (though I'm still rooting for the day that we may hopefully be able to apply potion effects directly via command block!)
i was gonna say that 0.0
Posted Image

#16

Magix
    Magix

    Ghast Hunter

  • Members
  • 2743 posts
  • Location: Estonia
  • Minecraft: Magixx

Posted 02 December 2012 - 01:29 AM

By the way, it IS possible to give pre enchanted items to the player in vanilla. But it can't be created in vanilla.

Basically you're going to make the item, enchant it, drop it down. Use sethblings createspawner filter on it. You now have a mob spawner that spawns your enchanted item.
You'll probably want to give it to the player by using a command block to teleport them next to the spawner, they pick it up, and then the player gets teleported back to original location.

Kinda gimmicky, but it's possible.
Edit: video

Posted Image

#17

Windy193
    Windy193

    Tree Puncher

  • Members
  • 33 posts
  • Location: Georgia, USA
  • Minecraft: Windy193
  • Xbox:Windy193

Posted 06 December 2012 - 05:17 PM

Does this work in multiplayer? Everytime I try to use it on the server I'm on it just gives me the item and not the enchantment.

#18

EnderArms

Posted 07 December 2012 - 08:47 AM

View PostWindy193, on 06 December 2012 - 05:17 PM, said:

Does this work in multiplayer? Everytime I try to use it on the server I'm on it just gives me the item and not the enchantment.
You have to be holding the item
Posted Image

#19

EnderArms

Posted 09 December 2012 - 10:56 PM

I hope mojang fixes the "0" bug

Download the Single Player Commands mod its easier
Posted Image

#20

EnderArms

Posted 15 December 2012 - 05:45 PM

View PostMagix, on 02 December 2012 - 01:29 AM, said:

By the way, it IS possible to give pre enchanted items to the player in vanilla. But it can't be created in vanilla.

Basically you're going to make the item, enchant it, drop it down. Use sethblings createspawner filter on it. You now have a mob spawner that spawns your enchanted item.
You'll probably want to give it to the player by using a command block to teleport them next to the spawner, they pick it up, and then the player gets teleported back to original location.

Kinda gimmicky, but it's possible.
Edit: video

Interesting, seems a bit complex.
Posted Image