Copying a region and paste it with the API has an offset of a few hundret blocks
EscolarProgramming opened this issue ยท 4 comments
Server Implementation
Paper
Server Version
1.18.1
Describe the bug
I want to clone a region from one world to another world at the exact same coordinates. I'm using the following code snippet:
CuboidRegion from = new CuboidRegion(BukkitAdapter.asBlockVector(region.getLoc1()), BukkitAdapter.asBlockVector(region.getLoc2()));
BlockArrayClipboard clipboard = new BlockArrayClipboard(from);
try (EditSession editSession = WorldEdit.getInstance().newEditSession(BukkitAdapter.adapt(region.getLoc1().getWorld()))) {
ForwardExtentCopy forwardExtentCopy = new ForwardExtentCopy(
editSession, from, clipboard, from.getMinimumPoint()
);
forwardExtentCopy.setCopyingEntities(true);
forwardExtentCopy.setRemovingEntities(false);
Operations.complete(forwardExtentCopy);
}
try (EditSession editSession = WorldEdit.getInstance().newEditSession(BukkitAdapter.adapt(worldTo))) {
Operation operation = new ClipboardHolder(clipboard)
.createPaste(editSession)
.to(clipboard.getMinimumPoint())
.copyEntities(true)
.ignoreAirBlocks(true)
.build();
Operations.complete(operation);
}
If I use FAWE, the paste will be set with a huge offset (90 blocks higher, 34 to the side). If I use normal WE, all works fine.
To Reproduce
- Use the code snippet above
- Try to clone a region with it
- There you go
Expected behaviour
It should be pasted at the correct location
Screenshots / Videos
Cloned in the same world so you can see the offset
Error log (if applicable)
No response
Fawe Debugpaste
https://athion.net/ISPaster/paste/view/4f9b8a669c6a4e5fa9cae3bbbaa371b0
Fawe Version
FastAsyncWorldEdit version 2.0.0-SNAPSHOT-63;5fc0de0
Checklist
- I have included a Fawe debugpaste.
- I am using the newest build from https://ci.athion.net/job/FastAsyncWorldEdit/ and the issue still persists.
Anything else?
No response
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If the issue is still present and can be reproduced, please let the team know. Thank you for your contributions.
I've tried it again with the latest version (FastAsyncWorldEdit-78 and Paper-177) and the error still persists.
I've also tried to find any regularity, but it doesn't seem to exist, in my opinion. The golden structure with the dimensions 12x9x6 has an offset of x+35 y+90 z+4. A structure with 3x3x4 has an offset of x+8 y+80 z+50, another structure with the same dimensions on another place has the offset x-50 y+84 z+40. It seems like the offset is independent of the size of the structure, but it is for one structure everytime the same offset.