0

As the title asks, Is there any way to use the clone command to only replace air blocks, such as breaking a floor and it being replaced by other blocks?

I know that this can be done using /fill, but I wanted to know if it can be done using /clone

1

1 Answer 1

1

There isn't one command to do this and there's a bug report about that: https://bugs.mojang.com/browse/MC-126514

But what you can do is cloning your target area somewhere else, then cloning your source to the target and then cloning the temporary area back to the target using the "masked" mode of /clone. This first makes the target identical to the source and then places back all blocks except for air.

2
  • That doesn't work, it replaces the air aswell as other blocks
    – sir sid
    Commented Sep 11, 2019 at 12:43
  • Oh right, it's basically the opposite in a way: It also doesn't copy air, but it does overwrite blocks if there are blocks in both the source and the target region. I'll change my answer. Commented Sep 11, 2019 at 15:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.