From d48ea909b551dc1579a89f3dc7a6caeb8a0c1d41 Mon Sep 17 00:00:00 2001 From: Cygaan <30848157+Cygaan@users.noreply.github.com> Date: Mon, 28 Jan 2019 17:31:29 +0100 Subject: [PATCH 1/2] Actually filter out players, not everything else --- .../sk89q/worldedit/function/operation/ForwardExtentCopy.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/function/operation/ForwardExtentCopy.java b/worldedit-core/src/main/java/com/sk89q/worldedit/function/operation/ForwardExtentCopy.java index 30a978121..5479e4ce8 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/function/operation/ForwardExtentCopy.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/function/operation/ForwardExtentCopy.java @@ -353,7 +353,7 @@ public class ForwardExtentCopy implements Operation { entities = source.getEntities() .stream() .filter(entity -> entity.getState() != null && - entity.getState().getType().getId().equals("minecraft:player")) + !entity.getState().getType().getId().equals("minecraft:player")) .collect(Collectors.toList()); } else { entities = new ArrayList<>(); From 6046fa1cec3a5c7db08d7a98c5a3494ea42b4b3c Mon Sep 17 00:00:00 2001 From: Cygaan <30848157+Cygaan@users.noreply.github.com> Date: Mon, 28 Jan 2019 17:36:39 +0100 Subject: [PATCH 2/2] Only copy entities from within the region --- .../sk89q/worldedit/function/operation/ForwardExtentCopy.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/function/operation/ForwardExtentCopy.java b/worldedit-core/src/main/java/com/sk89q/worldedit/function/operation/ForwardExtentCopy.java index 5479e4ce8..b8018657c 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/function/operation/ForwardExtentCopy.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/function/operation/ForwardExtentCopy.java @@ -353,7 +353,8 @@ public class ForwardExtentCopy implements Operation { entities = source.getEntities() .stream() .filter(entity -> entity.getState() != null && - !entity.getState().getType().getId().equals("minecraft:player")) + !entity.getState().getType().getId().equals("minecraft:player") && + region.contains(entity.getLocation().toVector())) .collect(Collectors.toList()); } else { entities = new ArrayList<>();