@FunctionalInterface public static interface BlockApiLookup.BlockApiProvider<A,C>
Modifier and Type | Method and Description |
---|---|
A |
find(net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos,
net.minecraft.block.BlockState state,
@Nullable net.minecraft.block.entity.BlockEntity blockEntity,
C context)
Return an API of type
A if available in the world at the given pos with the given context, or null otherwise. |
@Nullable A find(net.minecraft.world.World world, net.minecraft.util.math.BlockPos pos, net.minecraft.block.BlockState state, @Nullable @Nullable net.minecraft.block.entity.BlockEntity blockEntity, C context)
A
if available in the world at the given pos with the given context, or null
otherwise.world
- The world.pos
- The position in the world.state
- The block state.blockEntity
- The block entity, if it exists in the world.context
- Additional context passed to the query.A
, or null
if no API is available.