Package net.minecraft.world
Interface BlockView
- All Known Subinterfaces:
BlockRenderView,Chunk,class_5423,CollisionView,LunarWorldView,ServerWorldAccess,StructureWorldAccess,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)default doublegetDismountHeight(BlockPos pos)default doublegetDismountHeight(VoxelShape blockCollisionShape, Supplier<VoxelShape> belowBlockCollisionShapeGetter)FluidStategetFluidState(BlockPos pos)default intgetHeight()default intgetLuminance(BlockPos pos)default intgetMaxLightLevel()default Stream<BlockState>method_29546(Box box)default BlockHitResultraycast(RaycastContext context)static <T> Traycast(RaycastContext raycastContext, BiFunction<RaycastContext,BlockPos,T> context, Function<RaycastContext,T> blockRaycaster)default BlockHitResultraycastBlock(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
-
raycast
-
raycastBlock
@Nullable default BlockHitResult raycastBlock(Vec3d start, Vec3d end, BlockPos pos, VoxelShape shape, BlockState state) -
getDismountHeight
default double getDismountHeight(VoxelShape blockCollisionShape, Supplier<VoxelShape> belowBlockCollisionShapeGetter) -
getDismountHeight
-
raycast
static <T> T raycast(RaycastContext raycastContext, BiFunction<RaycastContext,BlockPos,T> context, Function<RaycastContext,T> blockRaycaster)
-