Package net.minecraft.world
Interface BlockView
- All Superinterfaces:
HeightLimitView
- All Known Subinterfaces:
BlockRenderView,CollisionView,LightSourceView,LunarWorldView,RedstoneView,RegistryWorldView,ServerWorldAccess,StructureWorldAccess,WorldAccess,WorldView
- All Known Implementing Classes:
BreakingBlockRenderState,Chunk,ChunkCache,ChunkRegion,ChunkRendererRegion,ClientWorld,EmptyBlockRenderView,EmptyBlockView,EmptyChunk,MovingBlockRenderState,ProtoChunk,ServerWorld,World,WorldChunk,WrapperProtoChunk
Represents a scoped, read-only view of block states, fluid states and block entities.
- Mappings:
Namespace Name named net/minecraft/world/BlockViewintermediary net/minecraft/class_1922official dqv
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionprivate static intcollectCollisionsBetween(LongSet visited, Vec3d vec3d, Box box, BlockView.CollisionVisitor collisionVisitor) static booleancollectCollisionsBetween(Vec3d from, Vec3d to, Box box, BlockView.CollisionVisitor visitor) getBlockEntity(BlockPos pos) Returns the block entity atpos, ornullif there is none.default <T extends BlockEntity>
Optional<T> getBlockEntity(BlockPos pos, BlockEntityType<T> type) getBlockState(BlockPos pos) Returns the block state atpos.default doubledefault doublegetDismountHeight(VoxelShape blockCollisionShape, Supplier<VoxelShape> belowBlockCollisionShapeGetter) getFluidState(BlockPos pos) Returns the fluid state atpos.default intgetLuminance(BlockPos pos) default Stream<BlockState> getStatesInBox(Box box) private static Vec3imethod_73110(Vec3d vec3d) static <T,C> T raycast(Vec3d start, Vec3d end, C context, BiFunction<C, BlockPos, T> blockHitFactory, Function<C, T> missFactory) default BlockHitResultraycast(BlockStateRaycastContext context) default BlockHitResultraycast(RaycastContext context) default @Nullable BlockHitResultraycastBlock(Vec3d start, Vec3d end, BlockPos pos, VoxelShape shape, BlockState state) Methods inherited from interface net.minecraft.world.HeightLimitView
countVerticalSections, getBottomSectionCoord, getBottomY, getHeight, getSectionIndex, getTopSectionCoord, getTopYInclusive, isInHeightLimit, isOutOfHeightLimit, isOutOfHeightLimit, sectionCoordToIndex, sectionIndexToCoord
-
Method Details
-
getBlockEntity
Returns the block entity atpos, ornullif there is none.- Returns:
- the block entity at
pos, ornullif there is none - Mappings:
Namespace Name Mixin selector named getBlockEntityLnet/minecraft/world/BlockView;getBlockEntity(Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/block/entity/BlockEntity;intermediary method_8321Lnet/minecraft/class_1922;method_8321(Lnet/minecraft/class_2338;)Lnet/minecraft/class_2586;official c_Ldqv;c_(Lja;)Legh;
-
getBlockEntity
- Mappings:
Namespace Name Mixin selector named getBlockEntityLnet/minecraft/world/BlockView;getBlockEntity(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/entity/BlockEntityType;)Ljava/util/Optional;intermediary method_35230Lnet/minecraft/class_1922;method_35230(Lnet/minecraft/class_2338;Lnet/minecraft/class_2591;)Ljava/util/Optional;official aLdqv;a(Lja;Legj;)Ljava/util/Optional;
-
getBlockState
Returns the block state atpos.- Returns:
- the block state at
pos - Implementation Note:
- This returns the block state for
Blocks.VOID_AIRif the Y coordinate is outside the height limit. - Mappings:
Namespace Name Mixin selector named getBlockStateLnet/minecraft/world/BlockView;getBlockState(Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/block/BlockState;intermediary method_8320Lnet/minecraft/class_1922;method_8320(Lnet/minecraft/class_2338;)Lnet/minecraft/class_2680;official a_Ldqv;a_(Lja;)Lejn;
-
getFluidState
Returns the fluid state atpos.- Returns:
- the fluid state at
pos - Implementation Note:
- This returns the fluid state for
Fluids.EMPTYif the Y coordinate is outside the height limit. - Mappings:
Namespace Name Mixin selector named getFluidStateLnet/minecraft/world/BlockView;getFluidState(Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/fluid/FluidState;intermediary method_8316Lnet/minecraft/class_1922;method_8316(Lnet/minecraft/class_2338;)Lnet/minecraft/class_3610;official b_Ldqv;b_(Lja;)Lfgb;
-
getLuminance
- Mappings:
Namespace Name Mixin selector named getLuminanceLnet/minecraft/world/BlockView;getLuminance(Lnet/minecraft/util/math/BlockPos;)Iintermediary method_8317Lnet/minecraft/class_1922;method_8317(Lnet/minecraft/class_2338;)Iofficial iLdqv;i(Lja;)I
-
getStatesInBox
- Mappings:
Namespace Name Mixin selector named getStatesInBoxLnet/minecraft/world/BlockView;getStatesInBox(Lnet/minecraft/util/math/Box;)Ljava/util/stream/Stream;intermediary method_29546Lnet/minecraft/class_1922;method_29546(Lnet/minecraft/class_238;)Ljava/util/stream/Stream;official aLdqv;a(Lfod;)Ljava/util/stream/Stream;
-
raycast
- Mappings:
Namespace Name Mixin selector named raycastLnet/minecraft/world/BlockView;raycast(Lnet/minecraft/world/BlockStateRaycastContext;)Lnet/minecraft/util/hit/BlockHitResult;intermediary method_32880Lnet/minecraft/class_1922;method_32880(Lnet/minecraft/class_5702;)Lnet/minecraft/class_3965;official aLdqv;a(Ldqx;)Lfoe;
-
raycast
- Mappings:
Namespace Name Mixin selector named raycastLnet/minecraft/world/BlockView;raycast(Lnet/minecraft/world/RaycastContext;)Lnet/minecraft/util/hit/BlockHitResult;intermediary method_17742Lnet/minecraft/class_1922;method_17742(Lnet/minecraft/class_3959;)Lnet/minecraft/class_3965;official aLdqv;a(Ldqy;)Lfoe;
-
raycastBlock
@Nullable default @Nullable BlockHitResult raycastBlock(Vec3d start, Vec3d end, BlockPos pos, VoxelShape shape, BlockState state) - Mappings:
Namespace Name Mixin selector named raycastBlockLnet/minecraft/world/BlockView;raycastBlock(Lnet/minecraft/util/math/Vec3d;Lnet/minecraft/util/math/Vec3d;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/shape/VoxelShape;Lnet/minecraft/block/BlockState;)Lnet/minecraft/util/hit/BlockHitResult;intermediary method_17745Lnet/minecraft/class_1922;method_17745(Lnet/minecraft/class_243;Lnet/minecraft/class_243;Lnet/minecraft/class_2338;Lnet/minecraft/class_265;Lnet/minecraft/class_2680;)Lnet/minecraft/class_3965;official aLdqv;a(Lfoi;Lfoi;Lja;Lfpd;Lejn;)Lfoe;
-
getDismountHeight
default double getDismountHeight(VoxelShape blockCollisionShape, Supplier<VoxelShape> belowBlockCollisionShapeGetter) - Mappings:
Namespace Name Mixin selector named getDismountHeightLnet/minecraft/world/BlockView;getDismountHeight(Lnet/minecraft/util/shape/VoxelShape;Ljava/util/function/Supplier;)Dintermediary method_30346Lnet/minecraft/class_1922;method_30346(Lnet/minecraft/class_265;Ljava/util/function/Supplier;)Dofficial aLdqv;a(Lfpd;Ljava/util/function/Supplier;)D
-
getDismountHeight
- Mappings:
Namespace Name Mixin selector named getDismountHeightLnet/minecraft/world/BlockView;getDismountHeight(Lnet/minecraft/util/math/BlockPos;)Dintermediary method_30347Lnet/minecraft/class_1922;method_30347(Lnet/minecraft/class_2338;)Dofficial jLdqv;j(Lja;)D
-
raycast
static <T,C> T raycast(Vec3d start, Vec3d end, C context, BiFunction<C, BlockPos, T> blockHitFactory, Function<C, T> missFactory) - Mappings:
Namespace Name Mixin selector named raycastLnet/minecraft/world/BlockView;raycast(Lnet/minecraft/util/math/Vec3d;Lnet/minecraft/util/math/Vec3d;Ljava/lang/Object;Ljava/util/function/BiFunction;Ljava/util/function/Function;)Ljava/lang/Object;intermediary method_17744Lnet/minecraft/class_1922;method_17744(Lnet/minecraft/class_243;Lnet/minecraft/class_243;Ljava/lang/Object;Ljava/util/function/BiFunction;Ljava/util/function/Function;)Ljava/lang/Object;official aLdqv;a(Lfoi;Lfoi;Ljava/lang/Object;Ljava/util/function/BiFunction;Ljava/util/function/Function;)Ljava/lang/Object;
-
collectCollisionsBetween
static boolean collectCollisionsBetween(Vec3d from, Vec3d to, Box box, BlockView.CollisionVisitor visitor) - Mappings:
Namespace Name Mixin selector named collectCollisionsBetweenLnet/minecraft/world/BlockView;collectCollisionsBetween(Lnet/minecraft/util/math/Vec3d;Lnet/minecraft/util/math/Vec3d;Lnet/minecraft/util/math/Box;Lnet/minecraft/world/BlockView$CollisionVisitor;)Zintermediary method_67677Lnet/minecraft/class_1922;method_67677(Lnet/minecraft/class_243;Lnet/minecraft/class_243;Lnet/minecraft/class_238;Lnet/minecraft/class_1922$class_10781;)Zofficial aLdqv;a(Lfoi;Lfoi;Lfod;Ldqv$a;)Z
-
collectCollisionsBetween
private static int collectCollisionsBetween(LongSet visited, Vec3d vec3d, Box box, BlockView.CollisionVisitor collisionVisitor) - Mappings:
Namespace Name Mixin selector named collectCollisionsBetweenLnet/minecraft/world/BlockView;collectCollisionsBetween(Lit/unimi/dsi/fastutil/longs/LongSet;Lnet/minecraft/util/math/Vec3d;Lnet/minecraft/util/math/Box;Lnet/minecraft/world/BlockView$CollisionVisitor;)Iintermediary method_61715Lnet/minecraft/class_1922;method_61715(Lit/unimi/dsi/fastutil/longs/LongSet;Lnet/minecraft/class_243;Lnet/minecraft/class_238;Lnet/minecraft/class_1922$class_10781;)Iofficial aLdqv;a(Lit/unimi/dsi/fastutil/longs/LongSet;Lfoi;Lfod;Ldqv$a;)I
-
method_73110
- Mappings:
Namespace Name Mixin selector named method_73110Lnet/minecraft/world/BlockView;method_73110(Lnet/minecraft/util/math/Vec3d;)Lnet/minecraft/util/math/Vec3i;intermediary method_73110Lnet/minecraft/class_1922;method_73110(Lnet/minecraft/class_243;)Lnet/minecraft/class_2382;official aLdqv;a(Lfoi;)Lkf;
-