Interface HeightLimitView

All Known Subinterfaces:
BlockRenderView, BlockView, 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 HeightLimitView
A view with a height limit specification.
Mappings:
Namespace Name
named net/minecraft/world/HeightLimitView
intermediary net/minecraft/class_5539
official dhj
  • Method Summary

    Modifier and Type
    Method
    Description
    default int
    Returns the number of sections, vertically, within this view.
    create(int bottomY, int height)
     
    default int
    Returns the bottom section coordinate, inclusive, of this view.
    int
    Returns the bottom Y level, or height, inclusive, of this view.
    int
    Returns the difference in the minimum and maximum height.
    default int
    Returns a zero-based section index to which the y level belongs.
    default int
    Returns the top section coordinate, exclusive, of this view.
    default int
    Returns the top Y level, or height, inclusive, of this view.
    default boolean
     
    default boolean
    Checks if y is out of the height limit of this view.
    default boolean
    Checks if pos is out of the height limit of this view.
    default int
    Converts a section coordinate to a zero-based section index.
    default int
    Converts a zero-based section index to a section coordinate.
  • Method Details

    • getHeight

      int getHeight()
      Returns the difference in the minimum and maximum height.

      This is the number of blocks that can be modified in any vertical column within the view, or the vertical size, in blocks, of the view.

      Returns:
      the difference in the minimum and maximum height
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named getHeight Lnet/minecraft/world/HeightLimitView;getHeight()I
      intermediary method_31605 Lnet/minecraft/class_5539;method_31605()I
      official M_ Ldhj;M_()I
    • getBottomY

      int getBottomY()
      Returns the bottom Y level, or height, inclusive, of this view.
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named getBottomY Lnet/minecraft/world/HeightLimitView;getBottomY()I
      intermediary method_31607 Lnet/minecraft/class_5539;method_31607()I
      official L_ Ldhj;L_()I
    • getTopYInclusive

      default int getTopYInclusive()
      Returns the top Y level, or height, inclusive, of this view.
      See Also:
      Implementation Note:
      This implementation sums up the bottom Y and the height, then subtracts 1.
      Mappings:
      Namespace Name Mixin selector
      named getTopYInclusive Lnet/minecraft/world/HeightLimitView;getTopYInclusive()I
      intermediary method_31600 Lnet/minecraft/class_5539;method_31600()I
      official am Ldhj;am()I
    • countVerticalSections

      default int countVerticalSections()
      Returns the number of sections, vertically, within this view.
      Returns:
      the number of sections
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named countVerticalSections Lnet/minecraft/world/HeightLimitView;countVerticalSections()I
      intermediary method_32890 Lnet/minecraft/class_5539;method_32890()I
      official an Ldhj;an()I
    • getBottomSectionCoord

      default int getBottomSectionCoord()
      Returns the bottom section coordinate, inclusive, of this view.
      Returns:
      the bottom section coordinate
      See Also:
      Implementation Note:
      This implementation passes the bottom Y through ChunkSectionPos.getSectionCoord(int).
      Mappings:
      Namespace Name Mixin selector
      named getBottomSectionCoord Lnet/minecraft/world/HeightLimitView;getBottomSectionCoord()I
      intermediary method_32891 Lnet/minecraft/class_5539;method_32891()I
      official ao Ldhj;ao()I
    • getTopSectionCoord

      default int getTopSectionCoord()
      Returns the top section coordinate, exclusive, of this view.
      Returns:
      the top section coordinate
      See Also:
      Implementation Note:
      This implementation passes the top Y through ChunkSectionPos.getSectionCoord(int).
      Mappings:
      Namespace Name Mixin selector
      named getTopSectionCoord Lnet/minecraft/world/HeightLimitView;getTopSectionCoord()I
      intermediary method_31597 Lnet/minecraft/class_5539;method_31597()I
      official ap Ldhj;ap()I
    • isInHeightLimit

      default boolean isInHeightLimit(int y)
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named isInHeightLimit Lnet/minecraft/world/HeightLimitView;isInHeightLimit(I)Z
      intermediary method_62871 Lnet/minecraft/class_5539;method_62871(I)Z
      official d Ldhj;d(I)Z
    • isOutOfHeightLimit

      default boolean isOutOfHeightLimit(BlockPos pos)
      Checks if pos is out of the height limit of this view.
      Parameters:
      pos - the position to check
      Returns:
      true if pos is out of bounds, false otherwise.
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named isOutOfHeightLimit Lnet/minecraft/world/HeightLimitView;isOutOfHeightLimit(Lnet/minecraft/util/math/BlockPos;)Z
      intermediary method_31606 Lnet/minecraft/class_5539;method_31606(Lnet/minecraft/class_2338;)Z
      official s Ldhj;s(Ljh;)Z
    • isOutOfHeightLimit

      default boolean isOutOfHeightLimit(int y)
      Checks if y is out of the height limit of this view.

      y is out of bounds if it's lower than the bottom or higher than the top.

      Parameters:
      y - the Y level to check
      Returns:
      true if y is out of bounds, false otherwise.
      Mappings:
      Namespace Name Mixin selector
      named isOutOfHeightLimit Lnet/minecraft/world/HeightLimitView;isOutOfHeightLimit(I)Z
      intermediary method_31601 Lnet/minecraft/class_5539;method_31601(I)Z
      official e Ldhj;e(I)Z
    • getSectionIndex

      default int getSectionIndex(int y)
      Returns a zero-based section index to which the y level belongs.
      Returns:
      a zero-based index
      Mappings:
      Namespace Name Mixin selector
      named getSectionIndex Lnet/minecraft/world/HeightLimitView;getSectionIndex(I)I
      intermediary method_31602 Lnet/minecraft/class_5539;method_31602(I)I
      official f Ldhj;f(I)I
    • sectionCoordToIndex

      default int sectionCoordToIndex(int coord)
      Converts a section coordinate to a zero-based section index.
      Parameters:
      coord - the section coordinate
      Returns:
      a zero-based index
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named sectionCoordToIndex Lnet/minecraft/world/HeightLimitView;sectionCoordToIndex(I)I
      intermediary method_31603 Lnet/minecraft/class_5539;method_31603(I)I
      official g Ldhj;g(I)I
    • sectionIndexToCoord

      default int sectionIndexToCoord(int index)
      Converts a zero-based section index to a section coordinate.
      Parameters:
      index - the zero-based section index
      Returns:
      a section coordinate
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named sectionIndexToCoord Lnet/minecraft/world/HeightLimitView;sectionIndexToCoord(I)I
      intermediary method_31604 Lnet/minecraft/class_5539;method_31604(I)I
      official h Ldhj;h(I)I
    • create

      static HeightLimitView create(int bottomY, int height)
      Mappings:
      Namespace Name Mixin selector
      named create Lnet/minecraft/world/HeightLimitView;create(II)Lnet/minecraft/world/HeightLimitView;
      intermediary method_39034 Lnet/minecraft/class_5539;method_39034(II)Lnet/minecraft/class_5539;
      official e Ldhj;e(II)Ldhj;