Interface BlockInWorldPredicate


@Experimental @NonExtendable public interface BlockInWorldPredicate
A predicate for a Block.
See Also:
  • Method Details

    • testBlock

      default BlockInWorldPredicate.Result testBlock(Block block)
      Checks if the passed block matches the block predicate.

      This method will load the chunk the block is at in a synchronous manner.

      Parameters:
      block - the block instance to check
      Returns:
      the predicate result.
    • testBlock

      BlockInWorldPredicate.Result testBlock(Block block, boolean loadChunk)
      Checks if the passed block matches the block predicate.
      Parameters:
      block - the block instance to check
      loadChunk - if the chunk the block is located at should be loaded.
      Returns:
      the predicate result.