Skip to content
This repository was archived by the owner on Feb 19, 2019. It is now read-only.

Commit 844d10e

Browse files
committed
Use Predicate instead of Function in EntityCheckFunction
1 parent a973814 commit 844d10e

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/main/java/clientapi/util/entity/EntityCheckFunction.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
import net.minecraft.entity.Entity;
2020

21-
import java.util.function.Function;
21+
import java.util.function.Predicate;
2222

2323
/**
2424
* Implementation of {@link EntityCheck}.
@@ -39,16 +39,16 @@ public final class EntityCheckFunction implements EntityCheck {
3939
/**
4040
* A function that tests the specified entity
4141
*/
42-
private final Function<Entity, Boolean> isValid;
42+
private final Predicate<Entity> isValid;
4343

44-
public EntityCheckFunction(CheckType type, Function<Entity, Boolean> isValid) {
44+
public EntityCheckFunction(CheckType type, Predicate<Entity> isValid) {
4545
this.type = type;
4646
this.isValid = isValid;
4747
}
4848

4949
@Override
5050
public final boolean isValid(Entity entity) {
51-
return this.isValid.apply(entity);
51+
return this.isValid.test(entity);
5252
}
5353

5454
@Override

0 commit comments

Comments
 (0)