I need to place hundreds of blocks and I do that easily with the fill command. But, I can't seem to fill an area with top slabs. I tried /fill x1 y1 z1 x2 y2 z2 minecraft:stone_slab then I get bottom slabs placed.
5 Answers
In the 1.13 snapshot, use /fill x1 y1 z1 x2 y2 z2 minecraft:oak_slab[type=top].
The problem here is that the command/fill x1 y1 z1 x2 y2 z2 minecraft:stone_slab automatically means /fill x1 y1 z1 x2 y2 z2 minecraft:stone_slab 0, the 0 is added. If you change this 0 to another value, the slab will change it's position; 8 is for the upper stone slabs:
/fill x1 y1 z1 x2 y2 z2 minecraft:stone_slab 8Note: This technique works only for Minecraft versions 1.12.2 and older. For newer versions, check out the other answer on this question.
1None of the answers posted here work for me (Minecraft Bedrock 1.16+). I was searching forever to get this to work for me. I finally figured it out, and is kind of tricky. The various "original" stone slabs(stonebrick, andesite, cobble, etc.) are broken down into 4 groups(stone_slab, stone_slab2, etc.). There is an additional data value you need to get more specific(top, double)
This will give you mossy stone brick bottom slabs - /fill x1 y1 z1 x2 y2 z2 stone_slab4 Where as this will give you regular stone top slabs - /fill x1 y1 z1 x2 y2 z2 stone_slab4 10
Use the various information in the slab article wiki to help build your command. Took me a lot of tries to ge the regular stone upper slabs. The "Double Upper" used in the artivle is kind of a bad label as it seems to refer to the single upper slabs instead of 2 slabs together.
2Yes, the way that you would do this is by using a square bracket at the end of your block type. If you want top slabs, it would be executed as /fill x1 y1 z1 x2 y2 z2 minecraft:stone_slab[type=top]. If you want to find out some more things about /fill, this video will hopefully help:
As for top slabs, you can pretty much just tab the thing ingame. I did, and it worked out:
/fill {coördinates} {coördinates} minecraft:stone_slab[type=top]
I just tabbed in the command itself, but now you know it.