How can I make the /fill command add blocks, but only on top of certain blocks?

How can I make the /fill command add blocks, but only on top of certain blocks? - Crop anonymous cook in apron sifting flour while preparing baking dish against gray background

I'm looking for more information about the /fill command. I want to replace air blocks with another block, but only if they have a stone block below them. The command /fill ~ ~ ~ ~25 ~-5 ~25 air 0 replace dirt will replace every single air block with dirt, and that is obviously not the result that I want.

How can I add a layer of dirt on top of stone blocks, without filling the world with dirt?






Pictures about "How can I make the /fill command add blocks, but only on top of certain blocks?"

How can I make the /fill command add blocks, but only on top of certain blocks? - Cook adding flour into baking form while preparing meal
How can I make the /fill command add blocks, but only on top of certain blocks? - Slices of Melon Fruit on Gray Concrete Blocks
How can I make the /fill command add blocks, but only on top of certain blocks? - Smiling woman making candles in workshop



How do I change a specific block with the Fill command?

Once cheats are enabled, Minecraft: Bedrock Edition players can open their chat console in-game and type out their command. The syntax of the command to replace blocks (in Bedrock Edition specifically) is currently: /fill <from> <to> <tilename> [tiledata] replace <replacetilename> <replacedatavalue>

How do you fill a particular block in Minecraft?

Show activity on this post. Do /fill then both of your coordinates, 50 wood, 50 stone or any other block. It will be random but both of the blocks will be placed.



HOW TO USE THE FILL COMMAND ON MINECRAFT




Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.

Images: Klaus Nielsen, Klaus Nielsen, Cup of Couple, Anna Shvets