0

I would like to know a /give command that allows a block to be placed on any block in adventure mode.

For example, I'd like a cake that could be placed on any block in the game that it would usually be able to be placed on, even when the player is in adventure mode.

  • Please add more information. – DeMize Mar 31 '16 at 6:56
3

This is ablout what you said, this does it, works on erything maybe excluding stairs. Try it yourself:

 give @p cake 1 0 {CanPlaceOn:["minecraft:grass","minecraft:dirt","minecraft:stone","minecraft:cobblestone","minecraft:planks","minecraft:log","minecraft:cobblestone_wall","minecraft:bedrock","minecraft:redstone_block","minecraft:quartz_ore","minecraft:quartz","minecraft:cake","minecraft:sand","minecraft:gravel","minecraft:iron_ore","minecraft:coal_ore","minecraft:stained_hardened_clay","minecraft:leaves","minecraft:sponge","minecraft:glass","minecraft:lapis_ore","minecraft:dispenser","minecraft:sandstone","minecraft:stained_glass_pane","minecraft:stained_glass","minecraft:glass_pane","minecraft:lapis_block","minecraft:noteblock","minecraft:bed","minecraft:golden_rail","minecraft:detector_rail","minecraft:rail","minecraft:sticky_piston","minecraft:web","minecraft:piston","minecraft:wool","minecraft:wooden_stairs","minecraft:barrier","minecraft:slime","minecraft:iron_trapdoor","minecraft:prismarine","minecraft:sea_lantern","minecraft:hay_block","minecraft:carpet","minecraft:gold_block","minecraft:iron_block","minecraft:coal_block","minecraft:hardened_clay","minecraft:packed_ice","minecraft:ice","minecraft:double_stone_slab","minecraft:stone_slab","minecraft:red_sandstone","minecraft:obsidian","minecraft:mossy_cobblestone","minecraft:bookshelf","minecraft:tnt","minecraft:brick_block","minecraft:diamond_ore","minecraft:diamond_block","minecraft:farmland","minecraft:furnace","minecraft:crafting_table","minecraft:ladder","minecraft:redstone_ore","minecraft:redstone_wire","minecraft:snow","minecraft:netherrack","minecraft:glowstone","minecraft:soul_sand","minecraft:pumpkin","minecraft:mycelium","minecraft:end_stone","minecraft:emerald_ore","minecraft:emerald_block","minecraft:cocoa"]}

Expanded:

give @p cake 1 0 {CanPlaceOn:[ "minecraft:grass", "minecraft:dirt ", "minecraft:stone ", "minecraft:cobblestone ", "minecraft:planks ", "minecraft:log ", "minecraft:cobblestone_wall ", "minecraft:bedrock ", "minecraft:redstone_block ", "minecraft:quartz_ore ", "minecraft:quartz ", "minecraft:cake ", "minecraft:sand ", "minecraft:gravel ", "minecraft:iron_ore ", "minecraft:coal_ore ", "minecraft:stained_hardened_clay ", "minecraft:leaves ", "minecraft:sponge ", "minecraft:glass ", "minecraft:lapis_ore ", "minecraft:dispenser ", "minecraft:sandstone ", "minecraft:stained_glass_pane ", "minecraft:stained_glass ", "minecraft:glass_pane ", "minecraft:lapis_block ", "minecraft:noteblock ", "minecraft:bed ", "minecraft:golden_rail ", "minecraft:detector_rail ", "minecraft:rail ", "minecraft:sticky_piston ", "minecraft:web ", "minecraft:piston ", "minecraft:wool ", "minecraft:wooden_stairs ", "minecraft:barrier ", "minecraft:slime ", "minecraft:iron_trapdoor ", "minecraft:prismarine ", "minecraft:sea_lantern ", "minecraft:hay_block ", "minecraft:carpet ", "minecraft:gold_block ", "minecraft:iron_block ", "minecraft:coal_block ", "minecraft:hardened_clay ", "minecraft:packed_ice ", "minecraft:ice ", "minecraft:double_stone_slab ", "minecraft:stone_slab ", "minecraft:red_sandstone ", "minecraft:obsidian ", "minecraft:mossy_cobblestone ", "minecraft:bookshelf ", "minecraft:tnt ", "minecraft:brick_block ", "minecraft:diamond_ore ", "minecraft:diamond_block ", "minecraft:farmland ", "minecraft:furnace ", "minecraft:crafting_table ", "minecraft:ladder ", "minecraft:redstone_ore ", "minecraft:redstone_wire ", "minecraft:snow ", "minecraft:netherrack ", "minecraft:glowstone ", "minecraft:soul_sand ", "minecraft:pumpkin ", "minecraft:mycelium ", "minecraft:end_stone ", "minecraft:emerald_ore ", "minecraft:emerald_block ", "minecraft:cocoa " ]}

  • 1
    Thank you!!! Didn't work at first. Took away "a few" spaces and the tag was only "a little bit long". But now it works like a charm. – Haroun Mohamed-Fakier Mar 31 '16 at 16:05
2

This command should work:

/give @p minecraft:cake 1 0 {CanPlaceOn:["minecraft:stone","minecraft:dirt","minecraft:grass",...,"minecraft:structure_block"]}

Fill in the ellipsis with whatever blocks are in your world, or at least the ones that you would be able to place it on.

0

This question has been asked before, you need to edit the item's NBT Tag Also, I'm pretty sure this answer covers your question:

  • 1
    Please don't leave answers that have only links to answers. On the possibility that the linked site goes down or is removed, the person reading the answer needs to know what to do by reading only what you wrote. – ash4fun Mar 31 '16 at 14:48
  • Oh @ash4fun, sorry for that. Thanks for the instructions. – k4rshh Apr 7 '16 at 16:20

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.