Interface BlockView

All Superinterfaces:
HeightLimitView
All Known Subinterfaces:
BlockRenderView, CollisionView, LightSourceView, LunarWorldView, RedstoneView, RegistryWorldView, ServerWorldAccess, StructureWorldAccess, WorldAccess, WorldView
All Known Implementing Classes:
Chunk, ChunkCache, ChunkRegion, ChunkRendererRegion, ClientWorld, EmptyBlockRenderView, EmptyBlockView, EmptyChunk, FallingBlockEntityRenderState, ProtoChunk, ServerWorld, World, WorldChunk, WrapperProtoChunk

public interface BlockView extends HeightLimitView
Represents a scoped, read-only view of block states, fluid states and block entities.
Mappings:
Namespace Name
named net/minecraft/world/BlockView
intermediary net/minecraft/class_1922
official dgm
  • Field Details

    • field_54147

      static final int field_54147
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named field_54147 Lnet/minecraft/world/BlockView;field_54147:I
      intermediary field_54147 Lnet/minecraft/class_1922;field_54147:I
      official g Ldgm;g:I
  • Method Details

    • getBlockEntity

      @Nullable @Nullable BlockEntity getBlockEntity(BlockPos pos)
      Returns the block entity at pos, or null if there is none.
      Returns:
      the block entity at pos, or null if there is none
      Mappings:
      Namespace Name Mixin selector
      named getBlockEntity Lnet/minecraft/world/BlockView;getBlockEntity(Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/block/entity/BlockEntity;
      intermediary method_8321 Lnet/minecraft/class_1922;method_8321(Lnet/minecraft/class_2338;)Lnet/minecraft/class_2586;
      official c_ Ldgm;c_(Ljh;)Lduw;
    • getBlockEntity

      default <T extends BlockEntity> Optional<T> getBlockEntity(BlockPos pos, BlockEntityType<T> type)
      Mappings:
      Namespace Name Mixin selector
      named getBlockEntity Lnet/minecraft/world/BlockView;getBlockEntity(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/entity/BlockEntityType;)Ljava/util/Optional;
      intermediary method_35230 Lnet/minecraft/class_1922;method_35230(Lnet/minecraft/class_2338;Lnet/minecraft/class_2591;)Ljava/util/Optional;
      official a Ldgm;a(Ljh;Lduy;)Ljava/util/Optional;
    • getBlockState

      BlockState getBlockState(BlockPos pos)
      Returns the block state at pos.
      Returns:
      the block state at pos
      Implementation Note:
      This returns the block state for Blocks.VOID_AIR if the Y coordinate is outside the height limit.
      Mappings:
      Namespace Name Mixin selector
      named getBlockState Lnet/minecraft/world/BlockView;getBlockState(Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/block/BlockState;
      intermediary method_8320 Lnet/minecraft/class_1922;method_8320(Lnet/minecraft/class_2338;)Lnet/minecraft/class_2680;
      official a_ Ldgm;a_(Ljh;)Ldxu;
    • getFluidState

      FluidState getFluidState(BlockPos pos)
      Returns the fluid state at pos.
      Returns:
      the fluid state at pos
      Implementation Note:
      This returns the fluid state for Fluids.EMPTY if the Y coordinate is outside the height limit.
      Mappings:
      Namespace Name Mixin selector
      named getFluidState Lnet/minecraft/world/BlockView;getFluidState(Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/fluid/FluidState;
      intermediary method_8316 Lnet/minecraft/class_1922;method_8316(Lnet/minecraft/class_2338;)Lnet/minecraft/class_3610;
      official b_ Ldgm;b_(Ljh;)Letw;
    • getLuminance

      default int getLuminance(BlockPos pos)
      Mappings:
      Namespace Name Mixin selector
      named getLuminance Lnet/minecraft/world/BlockView;getLuminance(Lnet/minecraft/util/math/BlockPos;)I
      intermediary method_8317 Lnet/minecraft/class_1922;method_8317(Lnet/minecraft/class_2338;)I
      official i Ldgm;i(Ljh;)I
    • getStatesInBox

      default Stream<BlockState> getStatesInBox(Box box)
      Mappings:
      Namespace Name Mixin selector
      named getStatesInBox Lnet/minecraft/world/BlockView;getStatesInBox(Lnet/minecraft/util/math/Box;)Ljava/util/stream/Stream;
      intermediary method_29546 Lnet/minecraft/class_1922;method_29546(Lnet/minecraft/class_238;)Ljava/util/stream/Stream;
      official a Ldgm;a(Lfbs;)Ljava/util/stream/Stream;
    • raycast

      default BlockHitResult raycast(BlockStateRaycastContext context)
      Mappings:
      Namespace Name Mixin selector
      named raycast Lnet/minecraft/world/BlockView;raycast(Lnet/minecraft/world/BlockStateRaycastContext;)Lnet/minecraft/util/hit/BlockHitResult;
      intermediary method_32880 Lnet/minecraft/class_1922;method_32880(Lnet/minecraft/class_5702;)Lnet/minecraft/class_3965;
      official a Ldgm;a(Ldgo;)Lfbt;
    • raycast

      default BlockHitResult raycast(RaycastContext context)
      Mappings:
      Namespace Name Mixin selector
      named raycast Lnet/minecraft/world/BlockView;raycast(Lnet/minecraft/world/RaycastContext;)Lnet/minecraft/util/hit/BlockHitResult;
      intermediary method_17742 Lnet/minecraft/class_1922;method_17742(Lnet/minecraft/class_3959;)Lnet/minecraft/class_3965;
      official a Ldgm;a(Ldgp;)Lfbt;
    • raycastBlock

      @Nullable default @Nullable BlockHitResult raycastBlock(Vec3d start, Vec3d end, BlockPos pos, VoxelShape shape, BlockState state)
      Mappings:
      Namespace Name Mixin selector
      named raycastBlock Lnet/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_17745 Lnet/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 a Ldgm;a(Lfbx;Lfbx;Ljh;Lfcr;Ldxu;)Lfbt;
    • getDismountHeight

      default double getDismountHeight(VoxelShape blockCollisionShape, Supplier<VoxelShape> belowBlockCollisionShapeGetter)
      Mappings:
      Namespace Name Mixin selector
      named getDismountHeight Lnet/minecraft/world/BlockView;getDismountHeight(Lnet/minecraft/util/shape/VoxelShape;Ljava/util/function/Supplier;)D
      intermediary method_30346 Lnet/minecraft/class_1922;method_30346(Lnet/minecraft/class_265;Ljava/util/function/Supplier;)D
      official a Ldgm;a(Lfcr;Ljava/util/function/Supplier;)D
    • getDismountHeight

      default double getDismountHeight(BlockPos pos)
      Mappings:
      Namespace Name Mixin selector
      named getDismountHeight Lnet/minecraft/world/BlockView;getDismountHeight(Lnet/minecraft/util/math/BlockPos;)D
      intermediary method_30347 Lnet/minecraft/class_1922;method_30347(Lnet/minecraft/class_2338;)D
      official j Ldgm;j(Ljh;)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 raycast Lnet/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_17744 Lnet/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 a Ldgm;a(Lfbx;Lfbx;Ljava/lang/Object;Ljava/util/function/BiFunction;Ljava/util/function/Function;)Ljava/lang/Object;
    • collectCollisionsBetween

      static Iterable<BlockPos> collectCollisionsBetween(Vec3d oldPos, Vec3d newPos, Box boundingBox)
      Mappings:
      Namespace Name Mixin selector
      named collectCollisionsBetween Lnet/minecraft/world/BlockView;collectCollisionsBetween(Lnet/minecraft/util/math/Vec3d;Lnet/minecraft/util/math/Vec3d;Lnet/minecraft/util/math/Box;)Ljava/lang/Iterable;
      intermediary method_61714 Lnet/minecraft/class_1922;method_61714(Lnet/minecraft/class_243;Lnet/minecraft/class_243;Lnet/minecraft/class_238;)Ljava/lang/Iterable;
      official a Ldgm;a(Lfbx;Lfbx;Lfbs;)Ljava/lang/Iterable;
    • collectCollisionsBetween

      private static void collectCollisionsBetween(Set<BlockPos> result, Vec3d oldPos, Vec3d newPos, Box boundingBox)
      Mappings:
      Namespace Name Mixin selector
      named collectCollisionsBetween Lnet/minecraft/world/BlockView;collectCollisionsBetween(Ljava/util/Set;Lnet/minecraft/util/math/Vec3d;Lnet/minecraft/util/math/Vec3d;Lnet/minecraft/util/math/Box;)V
      intermediary method_61715 Lnet/minecraft/class_1922;method_61715(Ljava/util/Set;Lnet/minecraft/class_243;Lnet/minecraft/class_243;Lnet/minecraft/class_238;)V
      official a Ldgm;a(Ljava/util/Set;Lfbx;Lfbx;Lfbs;)V