Package net.minecraft.world
Interface BlockView
- All Superinterfaces:
HeightLimitView
- 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,World,WorldChunk
public interface BlockView extends HeightLimitView
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 intgetLuminance(BlockPos pos)default intgetMaxLightLevel()default Stream<BlockState>getStatesInBox(Box box)static <T, C> Traycast(Vec3d vec3d, Vec3d vec3d2, C c, BiFunction<C,BlockPos,T> biFunction, Function<C,T> function)default BlockHitResultraycast(BlockStateRaycastContext blockStateRaycastContext)default BlockHitResultraycast(RaycastContext context)default BlockHitResultraycastBlock(Vec3d start, Vec3d end, BlockPos pos, VoxelShape shape, BlockState state)Methods inherited from interface net.minecraft.world.HeightLimitView
getBottomSectionLimit, getSection, getSectionCount, getSectionIndex, getSectionIndexFromSection, getTopHeightLimit, getTopSectionLimit, isOutOfHeightLimit, isOutOfHeightLimit, method_32890, method_32891
-
Method Details
-
getBlockEntity
-
getBlockState
-
getFluidState
-
getLuminance
-
getMaxLightLevel
default int getMaxLightLevel() -
getStatesInBox
-
raycast
-
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, C> T raycast(Vec3d vec3d, Vec3d vec3d2, C c, BiFunction<C,BlockPos,T> biFunction, Function<C,T> function)
-