How do I /give an item with 1 durability and can only break certain blocks like dirt in 1.18.1



  • I have tried the following:

    /give @p minecraft:diamond_pickaxe{Damage:1560{CanDestroy:["minecraft:dirt"]}} 1 
    

    However, this doesn't work.



  • Here is your error (errors are in bold😞 /give @p minecraft:diamond_pickaxe{Damage:1560 { CanDestroy:["minecraft:dirt"] } } 1

    Remove the bolded text and add a comma before "CanDestroy"

    Like this: /give @a minecraft:diamond_pickaxe{Damage:1560,CanDestroy:["minecraft:dirt"]} 1

    You can also make it mine more than dirt with this: /give @a minecraft:diamond_pickaxe{Damage:1560,CanDestroy:["minecraft:dirt","minecraft:stone"]} 1




Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2