Skip to content

Commit

Permalink
Potential fix for Checker deprecation - 4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
JakeGBLP committed Jan 17, 2025
1 parent 81562f7 commit 39dfcb9
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.util.function.Predicate;

import static it.jakegblp.lusk.utils.DeprecationUtils.asPredicateOrChecker;
import static it.jakegblp.lusk.utils.DeprecationUtils.test;

@Name("Bounding Box - Overlaps")
@Description("Whether or not one or more bounding boxes overlap other bounding boxes.\nBounding boxes that are only intersecting at the borders are not considered overlapping.")
Expand Down Expand Up @@ -48,7 +46,7 @@ public boolean init(

@Override
public boolean check(@NotNull Event event) {
return boundingBox1.check(event, asPredicateOrChecker((Predicate<BoundingBox>) box1 -> boundingBox2.check(event, asPredicateOrChecker((Predicate<BoundingBox>) box1::overlaps))), isNegated());
return test(event,boundingBox1, box1 -> test(event, boundingBox2, box1::overlaps), isNegated());
}

@Override
Expand Down

0 comments on commit 39dfcb9

Please sign in to comment.