mojira.dev
MCPE-97021

(ALL Bedrock platforms) Fix can_place_on/can_destroy give commands

This command:
/give <player> <itemName> [amount] [data] works just fine, until you add components that is.
ANY specific blocks listed in a block category, i.e wools, planks(older), concrete + concrete powder, stained glass + stained glass panes, etc,
DO NOT WORK when you want to use them.
For example;
/give @s acacia_button 1 0
works fine. However;
/give @s acacia_button 1 0 {"can_place_on":{"blocks":["red_sand"]}}
Does NOT work, because to get red sand you need to say sand and then specify you want sand 1 not sand 0. Because of this specific types like wools, concretes, etc can't be used which SERVERLY limits map making potential on bedrock. Please Mojang, either give us a command system that can either do everything NBT tags can, OR just give bedrock NBT tags, or SOMETHING THAT DOESN'T LIMIT US!! IT IS VERY FRUSTRATING!!

Also, If I am missing the way to do this, then how come I couldn't find a good answer on the first 10 web PAGES! Please fix this, or make a way for us to do this, or mimic the way NBT tags are done. Please, mojang, please!

Messed up with placement of this bug. It is for Bedrock Edition. Please don't remove because of wrong label. When I created this I didn't see Minecraft Bedrock Edition as an option.

List of known blocks which won't work, and a key:
() will be used to define variations of normals.
AC = all colors
Sa = sand
O = oak
DO = dark oak
S = spruce
J = jungle
A = acacia
B = Birch
N = normal type(first in list)
Ch = chiseled
C = cut
Sm = Smooth
Ss = sandstone (normal)
NB = nether brick
R in front of N, Ch, C, Sm = red sand, sandstone and nether brick versions
P in front of G, An, D = polished version
M = mossy
Cr = cracked
G = granite
An = Andesite
D = diorite
P = prismarine
E = end stone brick
Cb = cobblestone
SB = stonebrick (normal)
Br = brick

NOTICE: When attempting if you enter the group names, works for all blocks in those groups!!!
"can_place_on" blocks- (blocks you want said item to be placed on)

  • sand(Sa, RSa)

  • wool(AC)

  • carpet(AC)

  • concrete(AC)

  • concrete powder(AC)

  • planks(DO, O, S, J, A, B)

  • terracotta(AC NOTICE:still called "hardened_clay" in database)

  • fence(DO, O, S, J, A, B)

  • sandstone(N, Ch, C, Sm, RN, RCh, RC, RSm)

  • stonebricks(N, M, Cr, Ch)

  • walls(N(Cb), Cb(M),G, D, An, Ss, RSs, SB(N), SB(M), Br, NB, RNB, E, P NOTICE: still called cobblestone_wall in database, which makes no sense, because there are walls which have nothing to do with cobblestone)

  • stones(N, G, PG, D, PD, An, PAn)

  • infested stone(N, Cb, SB(N), SB(M), SB(Cr), SB(Ch) NOTICE: still called monster_egg)

  • log(O, B, S)

  • log2(A, J, DO)

  • wood(DO, O, S, B, J, A)

  • wooden_slab(DO, O, S, B, J, A)
    NOTICE: I'm not going to even try listing all the slab types.

  • stone_slab1

  • stone_slab2

  • stone_slab3

  • stone_slab4

  • stairs

NOTICE!! ALL ABOVE BLOCKS DON'T WORK IN can_destroy component either!!!!

Linked issues

Comments 7

Thank you for your report! And sorry for the late response.
However, this issue has been temporarily closed as Awaiting Response.

Is this still an issue in the latest version? If so, can you add it to the affected versions?

Please try and use the following template:

Steps to Reproduce:
1.
2.
3.
...

Observed Results:
(Briefly describe what happens)

Expected Results:
(Briefly describe what should happen)

If your ticket does not look like the example given here, then it's likely to be closed as incomplete.

This ticket will automatically reopen when you reply.

Hello! Sorry for taking a few days to respond! I completely forgot I created this, but I do remember the issue. It was less of a bug and more of an undeveloped feature. It was back when components(bedrocks version of data tags) had first come out. I am not sure if it still exists in the current version of Minecraft. I can check later today when I have time on my phone, and I'll try to type in the command.

I'm back! Yes it's the current version. Again, I apologize if this is just me being stupid, but here are the steps to re-create it(simple really)

1. Open chat on any bedrock platform
2. Start typing the /give command for any block or item
3. get to a point similar to this: /give @s lever 2 0
4. from here you should be at the [components] part
5a. start typing the following: " {can_place_on: red_sand} " and press enter, or the send button for mobile, and you get an error message.

5b. repeat steps 2-4 and start typing this instead: " {can_place_on: sand} " and press enter, or send button for mobile, and you get a lever that says it can be placed on sand.

6. Got to the creative inventory and pull out sand and red sand.
7. Place both with a space between.

Quick intermission notes:

  • you should have 2 levers because of the way I asked you to fill it in

  • if you typed " {can_destroy: sand} " instead you will try to break the sand rather than place the block on both sand blocks

8. Change gamemode into survival.

9. Try to place the block on the normal sand block first. It should work.
10. Try to place the block on the red sand block next. It should also work.

11. Now try to, hold up wait a minute.

Why can you place it on both types? Is there a way to diversify what the blocks and items: can be placed on/can break? Not that I could find. If you replace sand with sandstone, it breaks/can place on all the sandstone blocks. Red and normal, chiseled, smoothed. It works for all of them.

There's a similar issue to /fill (replace).

1. creative world
2. dig down more than 16 blocks
3. open chat
4. type: " /fill ~16 ~16 ~16 ~-15 ~-15 ~-15 air 0 replace stone " and press enter.
5. Look around.
(You'll notice that Andesite, Granite, and Diorite are all removed along with normal stone.)

I believe this is because the game is looking at grouped blocks, and not the data tag names of the blocks, i.e polished_andesite, monster_spawner, etc.

In java you can even do

{CanPlaceOn:["furnace[facing=east]"]}

Would be pretty cool if bedrock had that

Is this issue being worked on? I haven’t found a way around this 

Unfortunately, it's still not fixed

It is weird because I haven't found a single video that tawlks about this bug, even in the recent videos (on Youtube). And it made me thinking if this bug occurs for everyone or not.

Jacob Alexander Rispoli

(Unassigned)

644898

Confirmed

Multiple

commands

1.14.60 Hotfix, 1.16.20

Retrieved