Use provided EditSession for paste(World, Vector)
This commit is contained in:
parent
3cb561eda7
commit
ad593deb0f
@ -118,12 +118,16 @@ public class Schematic {
|
||||
checkNotNull(world);
|
||||
checkNotNull(to);
|
||||
Region region = clipboard.getRegion();
|
||||
EditSessionBuilder builder = new EditSessionBuilder(world).autoQueue(true).checkMemory(false).allowedRegionsEverywhere().limitUnlimited();
|
||||
EditSession editSession;
|
||||
if (allowUndo) {
|
||||
editSession = builder.build();
|
||||
if (world instanceof EditSession) {
|
||||
editSession = (EditSession) world;
|
||||
} else {
|
||||
editSession = builder.changeSetNull().fastmode(true).build();
|
||||
EditSessionBuilder builder = new EditSessionBuilder(world).autoQueue(true).checkMemory(false).allowedRegionsEverywhere().limitUnlimited();
|
||||
if (allowUndo) {
|
||||
editSession = builder.build();
|
||||
} else {
|
||||
editSession = builder.changeSetNull().fastmode(true).build();
|
||||
}
|
||||
}
|
||||
Extent extent = clipboard;
|
||||
Mask sourceMask = editSession.getSourceMask();
|
||||
|
Loading…
Reference in New Issue
Block a user