How to fill an area with lava so that it doesn't flow? 1.13

I was wondering if it is possible to use the fill command in Minecraft 1.13 to make an area full of lava that won't flow.

Simply using fill ~ ~ ~ ~10 ~ ~10 minecraft:lava doesn't work in this version of the game. And the only property the block seems to have is level which isn't helpful for this application.

So is there any way to achieve what I'm looking for?


Solution 1:

As mentioned by Fabian Röling in a comment, there is a way to do it by continuously setting blocks with commands.

Here are the steps to do it:

1) Set down 4 repeating command blocks. If the area is not square or rectangular, you may need more (just enough to cover the entire perimeter with /fill). They must be repeating command blocks or it will not work.

2) For each of them, set the command to /fill x1 y1 z1 x2 y2 z2 minecraft:air, and replace the 6 parameters with the coordinates of one side of the area filled with lava. Do this for each side around the area with lava.

3) Turn the command blocks on, and they should continuously fill the borders of the lava-filled area with air, thus preventing it from expanding and keeping it contained to one area.