Package net.minecraft.world.level
Interface BlockGetter
- All Superinterfaces:
IBlockGetterExtension,LevelHeightAccessor
- All Known Subinterfaces:
BlockAndTintGetter,CollisionGetter,CommonLevelAccessor,LevelAccessor,LevelReader,LevelTimeAccess,LightChunk,ServerLevelAccessor,SignalGetter,WorldGenLevel
- All Known Implementing Classes:
ChunkAccess,ClientLevel,EmptyBlockAndTintGetter,EmptyBlockGetter,EmptyLevelChunk,FallingBlockRenderState,ImposterProtoChunk,Level,LevelChunk,PathNavigationRegion,ProtoChunk,RenderChunkRegion,ServerLevel,WorldGenRegion
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionprivate static intaddCollisionsAlongTravel(it.unimi.dsi.fastutil.longs.LongSet output, Vec3 from, Vec3 to, AABB boundingBox, BlockGetter.BlockStepVisitor stepVisitor) default BlockHitResultclip(ClipContext context) Checks if there's block betweenfromandtoof context.default BlockHitResultclipWithInteractionOverride(Vec3 startVec, Vec3 endVec, BlockPos pos, VoxelShape shape, BlockState state) static voidforEachBlockIntersectedBetween(Vec3 from, Vec3 to, AABB boundingBox, BlockGetter.BlockStepVisitor stepVisitor) getBlockEntity(BlockPos pos) default <T extends BlockEntity>
Optional<T> getBlockEntity(BlockPos pos, BlockEntityType<T> blockEntityType) default doubledefault doublegetBlockFloorHeight(VoxelShape shape, Supplier<VoxelShape> belowShapeSupplier) getBlockState(BlockPos pos) default Stream<BlockState> getBlockStates(AABB area) getFluidState(BlockPos pos) default intgetLightEmission(BlockPos pos) default BlockHitResultisBlockInLine(ClipBlockStateContext context) static <T,C> T traverseBlocks(Vec3 from, Vec3 to, C context, BiFunction<C, BlockPos, T> tester, Function<C, T> onFail) Methods inherited from interface net.neoforged.neoforge.common.extensions.IBlockGetterExtension
getAuxLightManager, getAuxLightManager, getModelDataMethods inherited from interface net.minecraft.world.level.LevelHeightAccessor
getHeight, getMaxSectionY, getMaxY, getMinSectionY, getMinY, getSectionIndex, getSectionIndexFromSectionY, getSectionsCount, getSectionYFromSectionIndex, isInsideBuildHeight, isOutsideBuildHeight, isOutsideBuildHeight
-
Field Details
-
MAX_BLOCK_ITERATIONS_ALONG_TRAVEL
static final int MAX_BLOCK_ITERATIONS_ALONG_TRAVEL- See Also:
-
-
Method Details
-
getBlockEntity
-
getBlockEntity
default <T extends BlockEntity> Optional<T> getBlockEntity(BlockPos pos, BlockEntityType<T> blockEntityType) -
getBlockState
-
getFluidState
-
getLightEmission
-
getBlockStates
-
isBlockInLine
-
clip
Checks if there's block betweenfromandtoof context. This uses the collision shape of provided block. -
clipWithInteractionOverride
@Nullable default BlockHitResult clipWithInteractionOverride(Vec3 startVec, Vec3 endVec, BlockPos pos, VoxelShape shape, BlockState state) -
getBlockFloorHeight
-
getBlockFloorHeight
-
traverseBlocks
static <T,C> T traverseBlocks(Vec3 from, Vec3 to, C context, BiFunction<C, BlockPos, T> tester, Function<C, T> onFail) -
forEachBlockIntersectedBetween
static void forEachBlockIntersectedBetween(Vec3 from, Vec3 to, AABB boundingBox, BlockGetter.BlockStepVisitor stepVisitor) -
addCollisionsAlongTravel
private static int addCollisionsAlongTravel(it.unimi.dsi.fastutil.longs.LongSet output, Vec3 from, Vec3 to, AABB boundingBox, BlockGetter.BlockStepVisitor stepVisitor)
-