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
,RenderSectionRegion
,ServerLevel
,WorldGenRegion
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionprivate static int
addCollisionsAlongTravel
(it.unimi.dsi.fastutil.longs.LongSet p_404983_, Vec3 p_365197_, Vec3 p_362395_, AABB p_362649_, BlockGetter.BlockStepVisitor p_405208_) default BlockHitResult
clip
(ClipContext pContext) Checks if there's block betweenfrom
andto
of context.default BlockHitResult
clipWithInteractionOverride
(Vec3 pStartVec, Vec3 pEndVec, BlockPos pPos, VoxelShape pShape, BlockState pState) static boolean
forEachBlockIntersectedBetween
(Vec3 pFrom, Vec3 pTo, AABB pBoundingBox, BlockGetter.BlockStepVisitor pVisitor) getBlockEntity
(BlockPos pPos) default <T extends BlockEntity>
Optional<T> getBlockEntity
(BlockPos pPos, BlockEntityType<T> pBlockEntityType) default double
getBlockFloorHeight
(BlockPos pPos) default double
getBlockFloorHeight
(VoxelShape pShape, Supplier<VoxelShape> pBelowShapeSupplier) getBlockState
(BlockPos p_45571_) default Stream
<BlockState> getBlockStates
(AABB pArea) getFluidState
(BlockPos pPos) default int
getLightEmission
(BlockPos pPos) default BlockHitResult
isBlockInLine
(ClipBlockStateContext pContext) static <T,
C> T traverseBlocks
(Vec3 pFrom, Vec3 pTo, C pContext, BiFunction<C, BlockPos, T> pTester, Function<C, T> pOnFail) Methods inherited from interface net.neoforged.neoforge.common.extensions.IBlockGetterExtension
getAuxLightManager, getAuxLightManager, getModelData
Methods 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 pPos, BlockEntityType<T> pBlockEntityType) -
getBlockState
-
getFluidState
-
getLightEmission
-
getBlockStates
-
isBlockInLine
-
clip
Checks if there's block betweenfrom
andto
of context. This uses the collision shape of provided block. -
clipWithInteractionOverride
@Nullable default 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, 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 p_404983_, Vec3 p_365197_, Vec3 p_362395_, AABB p_362649_, BlockGetter.BlockStepVisitor p_405208_)
-