Package net.minecraft.world.level
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 pVisited, Vec3 pTravelVector, AABB pBoundingBox, BlockGetter.BlockStepVisitor pVisitor) default BlockHitResultclip(ClipContext pContext) Checks if there's block betweenfromandtoof context.default @Nullable BlockHitResultclipWithInteractionOverride(Vec3 pStartVec, Vec3 pEndVec, BlockPos pPos, VoxelShape pShape, BlockState pState) static booleanforEachBlockIntersectedBetween(Vec3 pFrom, Vec3 pTo, AABB pBoundingBox, BlockGetter.BlockStepVisitor pVisitor) @Nullable BlockEntitygetBlockEntity(BlockPos pPos) default <T extends BlockEntity>
Optional<T> getBlockEntity(BlockPos pPos, BlockEntityType<T> pBlockEntityType) default doublegetBlockFloorHeight(BlockPos pPos) default doublegetBlockFloorHeight(VoxelShape pShape, Supplier<VoxelShape> pBelowShapeSupplier) getBlockState(BlockPos pPos) default Stream<BlockState> getBlockStates(AABB pArea) getFluidState(BlockPos pPos) private static Vec3igetFurthestCorner(Vec3 pTravelVector) default intgetLightEmission(BlockPos pPos) default BlockHitResultisBlockInLine(ClipBlockStateContext pContext) static <T,C> T traverseBlocks(Vec3 pFrom, Vec3 pTo, C pContext, BiFunction<C, BlockPos, @Nullable T> pTester, Function<C, T> pOnFail) 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
-
Method Details
-
getBlockEntity
-
getBlockEntity
default <T extends BlockEntity> Optional<T> getBlockEntity(BlockPos pPos, BlockEntityType<T> pBlockEntityType) -
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 pStartVec, Vec3 pEndVec, BlockPos pPos, VoxelShape pShape, BlockState pState) -
getBlockFloorHeight
-
getBlockFloorHeight
-
traverseBlocks
static <T,C> T traverseBlocks(Vec3 pFrom, Vec3 pTo, C pContext, BiFunction<C, BlockPos, @Nullable T> pTester, Function<C, T> pOnFail) -
forEachBlockIntersectedBetween
static boolean forEachBlockIntersectedBetween(Vec3 pFrom, Vec3 pTo, AABB pBoundingBox, BlockGetter.BlockStepVisitor pVisitor) -
addCollisionsAlongTravel
private static int addCollisionsAlongTravel(it.unimi.dsi.fastutil.longs.LongSet pVisited, Vec3 pTravelVector, AABB pBoundingBox, BlockGetter.BlockStepVisitor pVisitor) -
getFurthestCorner
-