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 BlockEntity
getBlockEntity(BlockPos pos)
BlockState
getBlockState(BlockPos pos)
default double
getDismountHeight(BlockPos pos)
default double
getDismountHeight(VoxelShape blockCollisionShape, Supplier<VoxelShape> belowBlockCollisionShapeGetter)
FluidState
getFluidState(BlockPos pos)
default int
getHeight()
default int
getLuminance(BlockPos pos)
default int
getMaxLightLevel()
default Stream<BlockState>
method_29546(Box box)
default BlockHitResult
raycast(RaycastContext context)
static <T> T
raycast(RaycastContext raycastContext, BiFunction<RaycastContext,BlockPos,T> context, Function<RaycastContext,T> blockRaycaster)
default BlockHitResult
raycastBlock(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)
-