Interface BlockGetter
- All Superinterfaces:
IBlockGetterExtension, LevelHeightAccessor
- All Known Subinterfaces:
BlockAndTintGetter, CollisionGetter, CommonLevelAccessor, LevelAccessor, LevelReader, LightChunk, ServerLevelAccessor, SignalGetter, WorldGenLevel
- All Known Implementing Classes:
BlockBreakingRenderState, ChunkAccess, ClientLevel, EmptyBlockAndTintGetter, EmptyBlockGetter, EmptyLevelChunk, ImposterProtoChunk, Level, LevelChunk, MovingBlockRenderState, PathNavigationRegion, ProtoChunk, RenderSectionRegion, ServerLevel, WorldGenRegion
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionprivate static intaddCollisionsAlongTravel(it.unimi.dsi.fastutil.longs.LongSet visitedBlocks, Vec3 deltaMove, AABB aabbAtTarget, BlockGetter.BlockStepVisitor visitor) default BlockHitResultclip(ClipContext c) Checks if there's block betweenfromandtoof context.default @Nullable BlockHitResultclipWithInteractionOverride(Vec3 from, Vec3 to, BlockPos pos, VoxelShape blockShape, BlockState blockState) static booleanforEachBlockIntersectedBetween(Vec3 from, Vec3 to, AABB aabbAtTarget, BlockGetter.BlockStepVisitor visitor) @Nullable BlockEntitygetBlockEntity(BlockPos pos) default <T extends BlockEntity>
Optional<T> getBlockEntity(BlockPos pos, BlockEntityType<T> type) default doubledefault doublegetBlockFloorHeight(VoxelShape blockShape, Supplier<VoxelShape> belowBlockShape) getBlockState(BlockPos pos) default Stream<BlockState> getBlockStates(AABB box) getFluidState(BlockPos pos) private static Vec3igetFurthestCorner(Vec3 direction) default intgetLightEmission(BlockPos pos) default BlockHitResultstatic <T,C> T traverseBlocks(Vec3 from, Vec3 to, C context, BiFunction<C, BlockPos, @Nullable T> consumer, Function<C, T> missFactory) Methods inherited from interface IBlockGetterExtension
getAuxLightManager, getAuxLightManager, getModelDataMethods inherited from interface LevelHeightAccessor
getHeight, getMaxSectionY, getMaxY, getMinSectionY, getMinY, getSectionIndex, getSectionIndexFromSectionY, getSectionsCount, getSectionYFromSectionIndex, isInsideBuildHeight, isOutsideBuildHeight, isOutsideBuildHeight
-
Method Details
-
getBlockEntity
-
getBlockEntity
-
getBlockState
-
getFluidState
-
getLightEmission
-
getBlockStates
-
isBlockInLine
-
clip
Checks if there's block betweenfromandtoof context. This uses the collision shape of provided block. -
clipWithInteractionOverride
default @Nullable BlockHitResult clipWithInteractionOverride(Vec3 from, Vec3 to, BlockPos pos, VoxelShape blockShape, BlockState blockState) -
getBlockFloorHeight
-
getBlockFloorHeight
-
traverseBlocks
static <T,C> T traverseBlocks(Vec3 from, Vec3 to, C context, BiFunction<C, BlockPos, @Nullable T> consumer, Function<C, T> missFactory) -
forEachBlockIntersectedBetween
static boolean forEachBlockIntersectedBetween(Vec3 from, Vec3 to, AABB aabbAtTarget, BlockGetter.BlockStepVisitor visitor) -
addCollisionsAlongTravel
private static int addCollisionsAlongTravel(it.unimi.dsi.fastutil.longs.LongSet visitedBlocks, Vec3 deltaMove, AABB aabbAtTarget, BlockGetter.BlockStepVisitor visitor) -
getFurthestCorner
-