-
Notifications
You must be signed in to change notification settings - Fork 226
Copying a region to another world.
Jesse Boyd edited this page Mar 30, 2017
·
1 revision
Some example code for copying a region from one world to another.
If the worlds will not be in use, the Anvil API can do this faster:
- https://github.com/boy0001/FastAsyncWorldedit/wiki/Anvil-API
- Might be significantly harder to use though.
EditSession copyWorld = new EditSessionBuilder("world").autoQueue(false).build(); // See https://github.com/boy0001/FastAsyncWorldedit/wiki/WorldEdit-EditSession
EditSession pasteWorld = new EditSessionBuilder("newWorld").build(); // See https://github.com/boy0001/FastAsyncWorldedit/wiki/WorldEdit-EditSession
Vector pos1 = new Vector(10, 3, 10);
Vector pos2 = new Vector(50, 90, 50);
CuboidRegion copyRegion = new CuboidRegion(pos1, pos2);
BlockArrayClipboard lazyCopy = copyWorld.lazyCopy(copyRegion);
Schematic schem = new Schematic(lazyCopy);
boolean pasteAir = true;
Vector to = new Vector(30, 10, 30);
schem.paste(pasteWorld, to, pasteAir);
pasteWorld.flushQueue();
This wiki is outdated, move to https://github.com/IntellectualSites/FastAsyncWorldEdit-Documentation/
This Wiki is for Legacy Versions (1.8 - 1.12.2). Check here for 1.13+ versions: https://github.com/IntellectualSites/FastAsyncWorldEdit-Documentation/