2

I've tried this command but it doesn't work:

/give @p minecraft:bow 1 0 {Unbreakable:1}

enter image description here

1
  • It seems that you have a damage value assigned to your bow. Damage values don't exist in 1.13+, as you may see from the answers.
    – Penguin
    Dec 11, 2020 at 15:50

4 Answers 4

4

I believe the right command is

/give @p minecraft:(put weapon here){Unbreakable:1} 1

Instead of the command you did. You will have to move your "1" after minecraft:bow to after {unbreakable:1}. Tell me if this does not work and what error you get.

3

Your Problems

You have one problem and I have one suggestion.

Problem: You put the count before the nbt the syntax for the give command is the following.

/give <selector> <item>{<nbt>} <count>

So an example of the give command is the following.

/give @p minecraft:carrot_on_a_stick{Unbreakable:1} 1

My suggestion is to always specify the correct data type for your NBT tags. The Unbreakable tag is a Byte tag, and while it is okay to just type in a 1, the technical correct way is to specify a Byte: 1b

The Final Command

With the solutions specified, you get what follows.

/give @p minecraft:bow{Unbreakable:1b} 1
1
  • It should be interpreted correctly even if it is specified as an integer instead of a Byte. It is not critical to check your data types, but it is good practice.
    – One 2 Many
    Dec 9, 2020 at 18:34
1

The syntax changed in 1.13 onward. You would use this now.

/give @p minecraft:bow{Unbreakable:1}

Before 1.13 you would use the original command.

/give @p minecraft:bow 1 0 {Unbreakable:1}
3
  • 1
    There have already been quite a lot of answers already - does your answer add any value? On Arqade, we'd prefer to answer only if you have something new to add.
    – One 2 Many
    Dec 11, 2020 at 3:42
  • 1
    @ExpertCoder14 I explained that it's 1.13 and onward. Dec 11, 2020 at 3:43
  • 1
    Ah, I see now. I'm not sure if creating a new answer is the right action in that case because it isn't really different from the existing answers; my gut tells me that this would have been better a suggested edit. Just want to let you know that duplicate answers are highly frowned upon. But thanks for mentioning that point, we've been discussing quite a lot on how to answer MC questions concerning versions.
    – One 2 Many
    Dec 11, 2020 at 3:54
-1

Being a programming language, Minecraft commands have some of the most nitpicky syntax and useless error messages. NBT in of itself is perhaps not too complicated, but Minecraft command syntax is not easy to learn for the simple reason that when you do something wrong, there is nearly no useful feedback.

If all you need to add is a single property (like unbreakable), then yes, the best choice is to do it manually, but it's worth noting there are other options, especially for more complex commands.

You can use a command generator like MCStacker to generate items with NBT tags much more simply. MCstacker has a lot of powerful tools for adding NBT and other useful features to vanilla commands.

MCstacker is not always that simple, but the first thing to do in your case would be to click on /give from the main menu, which that is a link to. After that, the first menu is to select what player you want to give the item to (It defaults to nearest player, but can be changed to anything Minecraft supports). Then, you can set any of the more complicated conditions to receive the item in the same section as the player or group who will revive them. After this, you can start making the item itself!

You can choose the item, in this case a bow, using the top drop-down box in the second grouping all the way at the bottom. After you select an item, in this case a bow, the grouping will get far bigger and have options for unbreakability, the name, the lore of the item,the current damage, the cost to repair in an anvil, enchantments, and more! There are several expanding windows, check boxes, and text boxes that are labeled with what they do.

Finally, to get your command, you can go to the top right corner and copy the text in the blue window. If it fails in your command line, that means it's too long and you need to run it in a command block.

Now you have your fully unbreakable bow with many enchantments, a custom name with cool colors, and even things that change the characteristics of the player.

or, you can just have unbreakable.

2
  • If you could even consider Minecraft a programming language, it would be probably top 3 for the most absolute simplest ones. In Minecraft commands you don’t have any of the difficult stuff that can make programming hard, and errors usually do tell you exactly what you did wrong. While you can make them complicated and more complex, commands like /give are pretty easy to wrap your head around and useful to learn the syntax for it. Just my opinion, but I don’t think /give is too hard especially considering all they did in the question was have a slightly wrong syntax for 1.12-
    – Penguin
    Dec 12, 2020 at 16:38
  • When working with NBT, the useful tips given when inputting commands like execute are simply not there. all it tells you is that the error occured<---[HERE]. I don't think that's very useful. Dec 12, 2020 at 16:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .