We've split up the commands, scripting and mods, and add ons category! Please be sure you get your thread in the right place.

4

/can_destroy and /can_place_on

3 Comments

Please sign in to leave a comment.

Sorted by oldest
  • 1
    Registered User commented
    Comment actions Permalink

    You mean the NBT tag of similar name?

    /give @s stone_pickaxe{CanDestroy:["minecraft:stone"]}

    /give @s oak_planks{CanPlaceOn:["minecraft:stone"]}

  • 1
    Registered User commented
    Comment actions Permalink

    /can_destroy and /can_place_on have never been commands, ever. They are components/NBT that you can add to an item.

    The way it works is you give a player an item like this.

    Bedrock:

    /give @p dirt 1 0 {"can_place_on":{"blocks":["wool"]}}

    Java:

    /give @p dirt{CanPlaceOn:["minecraft:white_wool"]

    And these commands work just fine in the current game, there is no need to fix anything.

  • 0
    Registered User commented
    Comment actions Permalink

    Hmm, can I ask a question, but how to give yourself a diamond ax on bedrock that can break not just boards, but a certain type of planks? For example, only oak planks, if I write give @p diamond_axe 1 0 {"can_destroy":{"blocks":["planks 0"]}}, unable to issueg writes: Component 'can_destroy' could not be updated. Same with can_place