Package net.minecraft.world
Interface BlockView
- All Known Subinterfaces:
BlockRenderView,Chunk,CollisionView,ServerWorldAccess,WorldAccess,WorldView
- All Known Implementing Classes:
ChunkCache,ChunkRegion,ChunkRendererRegion,ClientWorld,EmptyBlockView,EmptyChunk,ProtoChunk,ReadOnlyChunk,ServerWorld,VerticalBlockSample,World,WorldChunk
public interface BlockView
Represents a scoped, read-only view of block states, fluid states and block entities.
-
Method Summary
Modifier and Type Method Description BlockEntitygetBlockEntity(BlockPos pos)BlockStategetBlockState(BlockPos pos)FluidStategetFluidState(BlockPos pos)default intgetHeight()default intgetLuminance(BlockPos pos)default intgetMaxLightLevel()default Stream<BlockState>method_29546(Box box)default BlockHitResultrayTrace(RayTraceContext context)static <T> TrayTrace(RayTraceContext rayTraceContext, BiFunction<RayTraceContext,BlockPos,T> context, Function<RayTraceContext,T> blockRaytracer)default BlockHitResultrayTraceBlock(Vec3d start, Vec3d end, BlockPos pos, VoxelShape shape, BlockState state)
-
Method Details
-
getBlockEntity
-
getBlockState
-
getFluidState
-
getLuminance
-
getMaxLightLevel
default int getMaxLightLevel() -
getHeight
default int getHeight() -
method_29546
-
rayTrace
-
rayTraceBlock
@Nullable default BlockHitResult rayTraceBlock(Vec3d start, Vec3d end, BlockPos pos, VoxelShape shape, BlockState state) -
rayTrace
static <T> T rayTrace(RayTraceContext rayTraceContext, BiFunction<RayTraceContext,BlockPos,T> context, Function<RayTraceContext,T> blockRaytracer)
-