Pasting only specific blocks

Discussion in 'WorldEdit' started by Ronan Gamero, Apr 23, 2018.

  1. Ronan Gamero

    Ronan Gamero New Member

    So I've a big building I have to move from one sever to another. Doing that without crashing it is nearly impossible ( 1 mil+ blocks). Although much of the selection is actually terrain (the buildding incluedes a mineshaft system).
    So if I could copy and paste just the air blocks, and the other blocks, excluidng dirt and stone... it probably would work and wouldnt crash the server. But as far as I know, //gmask doesnt affect what you have in your clipboard, but just the blocks you are changing, so thre's no mask I can use to make it work.. or am I wrong?
  2. PseudoKnight

    PseudoKnight Well-Known Member Developer

    I believe schematics don't work that way. They don't work with non-cuboids or masks well. All positions within a cuboid selection are filled with some material or air). However, when you copy you can use -m which "sets a source mask so that excluded blocks become air" (eg. "//copy -m stone" only copies stone into the clipboard, and all other positions in the selection are copied as air). And when pasting you can use -a to skip air blocks. Pasting DOES respect gmask, but not copy. But the gmask applies to existing blocks, not blocks inside the clipboard.

    For gigantic schematics, you have a few options:

    1) Save it as a few schematics instead of one.

    2) Use an offline editor like MCEdit to paste it.

    3) Increase your RAM to allow larger pasting. This assumes you're "crashing" because you're running out of memory. If the server is just stalling, then you can just wait it out instead. People often think this is a crash, but it's not.

    4) Use FastAsyncWorldEdit. WorldEdit does pastes all at once on the main thread. This is pretty safe, but it locks your server while doing it. Other plugins have hooked into WE and used various techniques to minimize server performance impact. In my experience FAWE does this the best. While you can't get support for the plugin here, and it's going to be less stable overall, the author is very active and responsive to problems that pop up. They've even gone out of their way a couple times to fix compatibility problems that weren't even theirs.

    [edit] Took a few edits, but I think I covered what you need to know.
    Last edited: Apr 24, 2018
  3. Ronan Gamero

    Ronan Gamero New Member

    Alright, thanks, the masks when copying it actually helped a lot.
    Async, we had it.. but it was buggy, when we pasted stuff, some chuncks wouldnt load the blocks... it was weird... we use sponge btw.