Interface AsyncPositionPredicate

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface AsyncPositionPredicate
A predicate that tests a position in a world and may have to load data to answer.

Implementations return an already-completed future when they can answer from data in memory. AsyncSpatialSearch relies on that to keep a search that needs no loads synchronous.

  • Method Summary

    Modifier and Type
    Method
    Description
    testAsync(World world, org.joml.Vector3d point)
    Determines if the condition is met at the specified point in the given world.
  • Method Details

    • testAsync

      @Nonnull CompletableFuture<Boolean> testAsync(@Nonnull World world, @Nonnull org.joml.Vector3d point)
      Determines if the condition is met at the specified point in the given world.
      Parameters:
      world - The world to test the condition in.
      point - The point to test the condition at.
      Returns:
      a future completing with true if the condition is met.