2

I need an item to have one durability and only break one block, so I need this command:

/give @p minecraft:wooden_axe{CanDestroy:["minecraft:dark_oak_planks"]} 1

to also spawn it with only one durability but I don't know how, thanks for your help (also I'm in 1.17.1)

5
/give @p wooden_axe{CanDestroy:["minecraft:dark_oak_planks"],Damage:58} 1

Note the number in bold, that states how much a tool has been used before. So if you want to change the wooden axe to a, let say iron axe, and iron axe has a default durability of 250, so you would write:

/give @p wooden_axe{CanDestroy:["minecraft:dark_oak_planks"],Damage:249} 1

The reason it is 249 is because it is one less than the default durability, which is 250.

5
  • 1
    I tried this and it just said invalid because it thinks I'm trying to give the count, and i typed it exactly as you did, i tried it both normally and in a command block, and it just states the 58 part as invalid
    – B1M0
    Oct 31 at 3:17
  • 1
    Let me check it again, give me a second.
    – AlexJaynMF
    Oct 31 at 3:18
  • 1
    @B1M0 It should work now, try it.
    – AlexJaynMF
    Oct 31 at 3:20
  • 1
    thank you so much for the help it works now
    – B1M0
    Oct 31 at 3:23
  • 1
    @B1M0 Do you mind if you can click the check mark next to my answer? It would be most helpful.
    – AlexJaynMF
    Oct 31 at 3:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.