mirror of
https://github.com/boy0001/FastAsyncWorldedit.git
synced 2024-11-25 12:16:00 +01:00
Support sourceMask for paste
This commit is contained in:
parent
455353ec51
commit
ba4bd667eb
@ -149,6 +149,15 @@ public class Schematic {
|
|||||||
BlockTransformExtent source = new BlockTransformExtent(clipboard, transform, worldData.getBlockRegistry());
|
BlockTransformExtent source = new BlockTransformExtent(clipboard, transform, worldData.getBlockRegistry());
|
||||||
ForwardExtentCopy copy = new ForwardExtentCopy(source, clipboard.getRegion(), clipboard.getOrigin(), extent, to);
|
ForwardExtentCopy copy = new ForwardExtentCopy(source, clipboard.getRegion(), clipboard.getOrigin(), extent, to);
|
||||||
copy.setTransform(transform);
|
copy.setTransform(transform);
|
||||||
|
if (extent instanceof EditSession) {
|
||||||
|
EditSession editSession = (EditSession) extent;
|
||||||
|
Mask sourceMask = editSession.getSourceMask();
|
||||||
|
if (sourceMask != null) {
|
||||||
|
new MaskTraverser(sourceMask).reset(extent);
|
||||||
|
copy.setSourceMask(sourceMask);
|
||||||
|
editSession.setSourceMask(null);
|
||||||
|
}
|
||||||
|
}
|
||||||
if (!pasteAir) {
|
if (!pasteAir) {
|
||||||
copy.setSourceMask(new ExistingBlockMask(clipboard));
|
copy.setSourceMask(new ExistingBlockMask(clipboard));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user