find

@Nullable()
A find(C context)

Attempt to retrieve an API from a block in the world, using the world and the position passed at creation time.

Note: If the block state is known, it is more efficient to use find.

Return

The retrieved API, or {@code null} if no API was found.

Parameters

context

Additional context for the query, defined by type parameter C.

@Nullable()
abstract A find(@Nullable() BlockState state, C context)

Attempt to retrieve an API from a block in the world, using the world and the position passed at creation time.

Return

The retrieved API, or {@code null} if no API was found.

Parameters

state

The block state at the target position, or null if unknown.

context

Additional context for the query, defined by type parameter C.