Is there a command for it?

Ne
13

I play in the BE. Is there a command for it: If you hold any block in your hand, the block should appear / be replaced under the player. Is that possible on all Minecraft platforms?

Is there a command for it

(From a video)

Tw

You can set the coordinate of the block block in a command block / detect and then change the block with a chain command block, but then for each individual block

for example:

normal command block / detect 0 0 0 obsidian, the player would have to be recognized when he is standing on the block.

Then continue with a chain block and then insert the block.

Wa

Who was the video from

Ne

Alpha stone

gl

It only works with plugins or mods, unless you want to do it with 627152 Commands xD

Ne

Which mod?

gl

I don't know

I meant that you can just program some yourself

But I don't think there are such mods on the Internet

Ne

How do you do that? I don't know my way around…

an

With Minecraft bedrock you can forget that, far too complicated.

Ne

Ok, then step by step: how can you find out what kind of block someone is holding in their hand?

an

This is also not possible in the Bedrock Edition. The Bedrock Edition does not allow NBT in commands - in short: you can completely forget something like that.

Ne

And Java? Because I have Be and Java

an

For example:

/ execute as @a [nbt = {SelectedItem: {id: "minecraft: stone"}}] at @s run setblock ~ ~ -1 ~ stone

This finds out, for example, whether someone is holding a stone in their hand, and if so it places a stone in front of them. Write that in a command block and set it to repeat. And then take a stone in your hand. Should work.

Ne

Thanks!