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 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
getLuminance(BlockPos pos)
default int
getMaxLightLevel()
default Stream<BlockState>
getStatesInBox(Box box)
static <T, C> T
raycast(Vec3d vec3d, Vec3d vec3d2, C c, BiFunction<C,BlockPos,T> biFunction, Function<C,T> function)
default BlockHitResult
raycast(BlockStateRaycastContext blockStateRaycastContext)
default BlockHitResult
raycast(RaycastContext context)
default BlockHitResult
raycastBlock(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)
-