Minecraft Bedrock Edition: Give lever that can only be placed on a specific block












0















In my MC world i am building a map and in this map i need to be able to give the player a lever that can be placed on only one block of my choice (like a gold block for instance)



i tried these series of commands in a command block



give @p lever 1 0 {CanPlaceOn:[“gold_block”]}
give @p lever 1 0 {CanPlaceOn:[“minecraft:gold_block”]}
give @p lever 1 0 {CanPlaceOn:[gold_block]}
give @p lever 1 0 {CanPlaceOn:[“Block:gold_block]}


All of them give me an error at the syntax past the CanPlaceOn:[ (copy/paste them into your world and you’ll see what i mean)



What am i doing wrong? Ive checked all over the internet and it seems there aren’t any really clear guides on how to do this (and i know it can be done there is a map on mcpedl.com that is called “Escape!” and you get a lever that can only be placed on gold blocks)










share|improve this question

























  • This is a Q&A site, so you should make your "update" into an answer to your own question and then mark it as "accepted answer". Otherwise this stays open and will at some point be bumped to the homepage again to ask for answers.

    – Fabian Röling
    Oct 8 '17 at 20:36











  • ...aaaaand it just happened

    – Zelo101
    Jan 12 '18 at 19:20











  • You aren’t using the correct way of naming blocks. MCPE uses json instead of NBT

    – Detmondyou
    May 2 '18 at 23:56
















0















In my MC world i am building a map and in this map i need to be able to give the player a lever that can be placed on only one block of my choice (like a gold block for instance)



i tried these series of commands in a command block



give @p lever 1 0 {CanPlaceOn:[“gold_block”]}
give @p lever 1 0 {CanPlaceOn:[“minecraft:gold_block”]}
give @p lever 1 0 {CanPlaceOn:[gold_block]}
give @p lever 1 0 {CanPlaceOn:[“Block:gold_block]}


All of them give me an error at the syntax past the CanPlaceOn:[ (copy/paste them into your world and you’ll see what i mean)



What am i doing wrong? Ive checked all over the internet and it seems there aren’t any really clear guides on how to do this (and i know it can be done there is a map on mcpedl.com that is called “Escape!” and you get a lever that can only be placed on gold blocks)










share|improve this question

























  • This is a Q&A site, so you should make your "update" into an answer to your own question and then mark it as "accepted answer". Otherwise this stays open and will at some point be bumped to the homepage again to ask for answers.

    – Fabian Röling
    Oct 8 '17 at 20:36











  • ...aaaaand it just happened

    – Zelo101
    Jan 12 '18 at 19:20











  • You aren’t using the correct way of naming blocks. MCPE uses json instead of NBT

    – Detmondyou
    May 2 '18 at 23:56














0












0








0


0






In my MC world i am building a map and in this map i need to be able to give the player a lever that can be placed on only one block of my choice (like a gold block for instance)



i tried these series of commands in a command block



give @p lever 1 0 {CanPlaceOn:[“gold_block”]}
give @p lever 1 0 {CanPlaceOn:[“minecraft:gold_block”]}
give @p lever 1 0 {CanPlaceOn:[gold_block]}
give @p lever 1 0 {CanPlaceOn:[“Block:gold_block]}


All of them give me an error at the syntax past the CanPlaceOn:[ (copy/paste them into your world and you’ll see what i mean)



What am i doing wrong? Ive checked all over the internet and it seems there aren’t any really clear guides on how to do this (and i know it can be done there is a map on mcpedl.com that is called “Escape!” and you get a lever that can only be placed on gold blocks)










share|improve this question
















In my MC world i am building a map and in this map i need to be able to give the player a lever that can be placed on only one block of my choice (like a gold block for instance)



i tried these series of commands in a command block



give @p lever 1 0 {CanPlaceOn:[“gold_block”]}
give @p lever 1 0 {CanPlaceOn:[“minecraft:gold_block”]}
give @p lever 1 0 {CanPlaceOn:[gold_block]}
give @p lever 1 0 {CanPlaceOn:[“Block:gold_block]}


All of them give me an error at the syntax past the CanPlaceOn:[ (copy/paste them into your world and you’ll see what i mean)



What am i doing wrong? Ive checked all over the internet and it seems there aren’t any really clear guides on how to do this (and i know it can be done there is a map on mcpedl.com that is called “Escape!” and you get a lever that can only be placed on gold blocks)







minecraft-commands minecraft-pocket-edition






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Oct 10 '17 at 5:44







E. Huckabee

















asked Oct 8 '17 at 14:42









E. HuckabeeE. Huckabee

1196




1196













  • This is a Q&A site, so you should make your "update" into an answer to your own question and then mark it as "accepted answer". Otherwise this stays open and will at some point be bumped to the homepage again to ask for answers.

    – Fabian Röling
    Oct 8 '17 at 20:36











  • ...aaaaand it just happened

    – Zelo101
    Jan 12 '18 at 19:20











  • You aren’t using the correct way of naming blocks. MCPE uses json instead of NBT

    – Detmondyou
    May 2 '18 at 23:56



















  • This is a Q&A site, so you should make your "update" into an answer to your own question and then mark it as "accepted answer". Otherwise this stays open and will at some point be bumped to the homepage again to ask for answers.

    – Fabian Röling
    Oct 8 '17 at 20:36











  • ...aaaaand it just happened

    – Zelo101
    Jan 12 '18 at 19:20











  • You aren’t using the correct way of naming blocks. MCPE uses json instead of NBT

    – Detmondyou
    May 2 '18 at 23:56

















This is a Q&A site, so you should make your "update" into an answer to your own question and then mark it as "accepted answer". Otherwise this stays open and will at some point be bumped to the homepage again to ask for answers.

– Fabian Röling
Oct 8 '17 at 20:36





This is a Q&A site, so you should make your "update" into an answer to your own question and then mark it as "accepted answer". Otherwise this stays open and will at some point be bumped to the homepage again to ask for answers.

– Fabian Röling
Oct 8 '17 at 20:36













...aaaaand it just happened

– Zelo101
Jan 12 '18 at 19:20





...aaaaand it just happened

– Zelo101
Jan 12 '18 at 19:20













You aren’t using the correct way of naming blocks. MCPE uses json instead of NBT

– Detmondyou
May 2 '18 at 23:56





You aren’t using the correct way of naming blocks. MCPE uses json instead of NBT

– Detmondyou
May 2 '18 at 23:56










1 Answer
1






active

oldest

votes


















1














-UPDATE-



This is the proper command syntax for MCPE



/give @p lever 1 0 {"can_place_on":{"blocks":["gold_block"]}}


you can change the block or placeable item after the /give @p lever but it has to be a placeable item



also changing the block or adding more do this



adding more blocks



/give @p lever 1 0 {"can_place_on":{"blocks":["gold_block", "iron_block"]}}


to change the block you want to place it on just change the string inside the square brackets after {"blocks":["**this string here**"]}}



I’m really glad I figured this out and if it helps anyone else I’m also glad about that






share|improve this answer

























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "41"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    noCode: true, onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgaming.stackexchange.com%2fquestions%2f319328%2fminecraft-bedrock-edition-give-lever-that-can-only-be-placed-on-a-specific-bloc%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1














    -UPDATE-



    This is the proper command syntax for MCPE



    /give @p lever 1 0 {"can_place_on":{"blocks":["gold_block"]}}


    you can change the block or placeable item after the /give @p lever but it has to be a placeable item



    also changing the block or adding more do this



    adding more blocks



    /give @p lever 1 0 {"can_place_on":{"blocks":["gold_block", "iron_block"]}}


    to change the block you want to place it on just change the string inside the square brackets after {"blocks":["**this string here**"]}}



    I’m really glad I figured this out and if it helps anyone else I’m also glad about that






    share|improve this answer






























      1














      -UPDATE-



      This is the proper command syntax for MCPE



      /give @p lever 1 0 {"can_place_on":{"blocks":["gold_block"]}}


      you can change the block or placeable item after the /give @p lever but it has to be a placeable item



      also changing the block or adding more do this



      adding more blocks



      /give @p lever 1 0 {"can_place_on":{"blocks":["gold_block", "iron_block"]}}


      to change the block you want to place it on just change the string inside the square brackets after {"blocks":["**this string here**"]}}



      I’m really glad I figured this out and if it helps anyone else I’m also glad about that






      share|improve this answer




























        1












        1








        1







        -UPDATE-



        This is the proper command syntax for MCPE



        /give @p lever 1 0 {"can_place_on":{"blocks":["gold_block"]}}


        you can change the block or placeable item after the /give @p lever but it has to be a placeable item



        also changing the block or adding more do this



        adding more blocks



        /give @p lever 1 0 {"can_place_on":{"blocks":["gold_block", "iron_block"]}}


        to change the block you want to place it on just change the string inside the square brackets after {"blocks":["**this string here**"]}}



        I’m really glad I figured this out and if it helps anyone else I’m also glad about that






        share|improve this answer















        -UPDATE-



        This is the proper command syntax for MCPE



        /give @p lever 1 0 {"can_place_on":{"blocks":["gold_block"]}}


        you can change the block or placeable item after the /give @p lever but it has to be a placeable item



        also changing the block or adding more do this



        adding more blocks



        /give @p lever 1 0 {"can_place_on":{"blocks":["gold_block", "iron_block"]}}


        to change the block you want to place it on just change the string inside the square brackets after {"blocks":["**this string here**"]}}



        I’m really glad I figured this out and if it helps anyone else I’m also glad about that







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited 5 mins ago









        Community

        1




        1










        answered Oct 10 '17 at 5:44









        E. HuckabeeE. Huckabee

        1196




        1196






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Arqade!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgaming.stackexchange.com%2fquestions%2f319328%2fminecraft-bedrock-edition-give-lever-that-can-only-be-placed-on-a-specific-bloc%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Михайлов, Христо

            Гороховецкий артиллерийский полигон

            Центральная группа войск