mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-06 20:56:41 +00:00
Add support for copying entities between Extents.
This commit is contained in:
@ -582,15 +582,10 @@ public class EditSession implements Extent {
|
||||
return getBlock(position).isAir() && setBlock(position, block);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Entity> getEntities() {
|
||||
return world.getEntities();
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public Entity createEntity(com.sk89q.worldedit.util.Location location, BaseEntity entity) {
|
||||
return world.createEntity(location, entity);
|
||||
return bypassNone.createEntity(location, entity);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -649,6 +644,16 @@ public class EditSession implements Extent {
|
||||
return getWorld().getMaximumPoint();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends Entity> getEntities(Region region) {
|
||||
return bypassNone.getEntities(region);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends Entity> getEntities() {
|
||||
return bypassNone.getEntities();
|
||||
}
|
||||
|
||||
/**
|
||||
* Finish off the queue.
|
||||
*/
|
||||
@ -1160,6 +1165,7 @@ public class EditSession implements Extent {
|
||||
ForwardExtentCopy copy = new ForwardExtentCopy(this, region, buffer, to);
|
||||
copy.setTransform(new AffineTransform().translate(dir.multiply(distance)));
|
||||
copy.setSourceFunction(remove); // Remove
|
||||
copy.setRemovingEntities(true);
|
||||
if (!copyAir) {
|
||||
copy.setSourceMask(new ExistingBlockMask(this));
|
||||
}
|
||||
|
Reference in New Issue
Block a user