3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-12-25 02:20:07 +01:00

Check type, not state

Dieser Commit ist enthalten in:
Jesse Boyd 2019-04-14 12:16:15 +10:00
Ursprung eadf5ad246
Commit a4f63ec6f0
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 59F1DE6293AF6E1F

Datei anzeigen

@ -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<Entity>() {
@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<>();