Does anyone know if there is a command block command to give a player a diamond sword with specific level enchants on it by stepping on a pressure plate? enchants such as knockback II, mending, unbreaking III and so forth. I am using java version 1.14.4.
The command you wanted: /give @s diamond_sword{Enchantments:[{id:knockback,lvl:2},{id:unbreaking,lvl:3},{id:mending,lvl:1}]} 1
Also, you can understand commands just by looking at them. As you can see they are easy-to-read NBT data. You can use /data get to get the NBT data of a block. You can use them in a command block. Single or multiple, doesnt matter. Its not that hard. Its easy to learn them. Just practice.
I entered that command under console command in the command block and placed a button on the command block. nothing happened when I pressed the button.
From the position of the line breaks in your last 2 screenshots I'm quessing you took FirEmerald's advice to add a space after "sword"?
That appears to be bad advice, when I try entering it with the space most of the command is shown in red and the command doesn't work.
Both gheetch's command and clackiwe's command with @p instead of @s are working for me.
How do you have the command block set?
"Impulse-Unconditional-Needs Redstone" works for me.
Try cutting and pasting gheetch's command into the command block so you know you get it right and set it up as "Impulse-Unconditional-Needs Redstone" and see what happens.
If that doesn't work test it in a new world without any mods (I don't know if you have any apart from that map thing, the map alone seems unlikely to affect this but best to be certain.)
I see you tried with an unenchanted sword as well, did that work?
Thanks to all of you. I copied and pasted Gheetch's command into my command block and it worked as expected. Still don't know what I was doing wrong but all is good now. Again thank you all.
Thanks to all of you. I copied and pasted Gheetch's command into my command block and it worked as expected. Still don't know what I was doing wrong but all is good now. Again thank you all.
Oh jeeze, did i just helped someone on forum? You made my day :3
And the point was (sorry if somebody already said it) that you put space between item id and its nbt, so game thought that nbt is actually a count of items
Does anyone know if there is a command block command to give a player a diamond sword with specific level enchants on it by stepping on a pressure plate? enchants such as knockback II, mending, unbreaking III and so forth. I am using java version 1.14.4.
The command you wanted: /give @s diamond_sword{Enchantments:[{id:knockback,lvl:2},{id:unbreaking,lvl:3},{id:mending,lvl:1}]} 1
Also, you can understand commands just by looking at them. As you can see they are easy-to-read NBT data. You can use /data get to get the NBT data of a block. You can use them in a command block. Single or multiple, doesnt matter. Its not that hard. Its easy to learn them. Just practice.
I entered that command under console command in the command block and placed a button on the command block. nothing happened when I pressed the button.
try with @p
Still not working. Attached is a screen shot of what I have entered In the command block:
there needs to be a space after "diamond_sword", and you didn't even enter the command correctly.
Creator of Metroid Cubed 3, a Metroid-themed mod! Become a donator today!
Here is a snapshot of my latest failed attempt. What am I entering wrong please.
You guys forgot the quotes
Here's what it looks like
And some mapmakers using /give generators such as this one - http://mapmaking.fr/give/
I must be doing something wrong here but don't know what. It still doesn't work in my command block:
From the position of the line breaks in your last 2 screenshots I'm quessing you took FirEmerald's advice to add a space after "sword"?
That appears to be bad advice, when I try entering it with the space most of the command is shown in red and the command doesn't work.
Both gheetch's command and clackiwe's command with @p instead of @s are working for me.
How do you have the command block set?
"Impulse-Unconditional-Needs Redstone" works for me.
Try cutting and pasting gheetch's command into the command block so you know you get it right and set it up as "Impulse-Unconditional-Needs Redstone" and see what happens.
If that doesn't work test it in a new world without any mods (I don't know if you have any apart from that map thing, the map alone seems unlikely to affect this but best to be certain.)
I see you tried with an unenchanted sword as well, did that work?
Just testing.
/give @p diamond_sword{Enchantments:[{id:unbreaking,lvl:32767},{id:sharpness,lvl:32767},{id:looting,lvl:10}]}
max lv 32767
Goshdarnit, I keep forgetting that commands in 1.13+ are different.
Creator of Metroid Cubed 3, a Metroid-themed mod! Become a donator today!
Thanks to all of you. I copied and pasted Gheetch's command into my command block and it worked as expected. Still don't know what I was doing wrong but all is good now. Again thank you all.
Oh jeeze, did i just helped someone on forum? You made my day :3
And the point was (sorry if somebody already said it) that you put space between item id and its nbt, so game thought that nbt is actually a count of items
Upd.
it's just first time i use forums : p