From a4f63ec6f0051f5be45bb9469bcd51112c411010 Mon Sep 17 00:00:00 2001 From: Jesse Boyd Date: Sun, 14 Apr 2019 12:16:15 +1000 Subject: [PATCH] Check type, not state --- .../worldedit/function/operation/ForwardExtentCopy.java | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) 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 e1a276736..1d2a7c6e4 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 @@ -54,6 +54,7 @@ import com.sk89q.worldedit.math.BlockVector3; import com.sk89q.worldedit.math.transform.Identity; import com.sk89q.worldedit.math.transform.Transform; import com.sk89q.worldedit.regions.Region; +import com.sk89q.worldedit.world.entity.EntityType; import com.sk89q.worldedit.world.entity.EntityTypes; import javax.annotation.Nullable; @@ -360,13 +361,7 @@ public class ForwardExtentCopy implements Operation { // filter players since they can't be copied entities = source.getEntities(region) .stream() - .filter(new Predicate() { - @Override - public boolean apply(@Nullable Entity input) { - BaseEntity state = input.getState(); - return state != null && state.getType() != EntityTypes.PLAYER; - } - }) + .filter(e -> e.getType() != EntityTypes.PLAYER) .collect(Collectors.toList()); } else { entities = new ArrayList<>();