Interface HeightLimitView

All Known Subinterfaces:
BlockRenderView, BlockView, Chunk, class_5423, CollisionView, LunarWorldView, ServerWorldAccess, StructureWorldAccess, WorldAccess, WorldView
All Known Implementing Classes:
AlphaChunkIo.AlphaHeightLimitView, ChunkCache, ChunkRegion, ChunkRendererRegion, ClientWorld, DecoratorContext, EmptyBlockView, EmptyChunk, FlatChunkGeneratorConfig, ProtoChunk, ReadOnlyChunk, ServerWorld, World, WorldChunk

public interface HeightLimitView
A view with a height limit specification.
Mappings:
Namespace Name
official btx
intermediary net/minecraft/class_5539
named net/minecraft/world/HeightLimitView
  • Method Summary

    Modifier and Type Method Description
    default int countVerticalSections()
    Returns the number of sections, vertically, within this view.
    default int getBottomSectionCoord()
    Returns the bottom section coordinate, inclusive, of this view.
    int getBottomY()
    Returns the bottom Y level, or height, inclusive, of this view.
    int getHeight()
    Returns the difference in the minimum and maximum height.
    default int getSectionIndex​(int y)
    Returns a zero-based section index to which the y level belongs.
    default int getTopSectionCoord()
    Returns the top section coordinate, exclusive, of this view.
    default int getTopY()
    Returns the top Y level, or height, exclusive, of this view.
    default boolean isOutOfHeightLimit​(int y)
    Checks if y is out of the height limit of this view.
    default boolean isOutOfHeightLimit​(BlockPos pos)
    Checks if pos is out of the height limit of this view.
    default int sectionCoordToIndex​(int coord)
    Converts a section coordinate to a zero-based section index.
    default int sectionIndexToCoord​(int index)
    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:
      getBottomY(), getTopY()
      Mappings:
      Namespace Name Mixin selector
      official m Lbtx;m()I
      intermediary method_31605 Lnet/minecraft/class_5539;method_31605()I
      named getHeight Lnet/minecraft/world/HeightLimitView;getHeight()I
    • getBottomY

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

      default int getTopY()
      Returns the top Y level, or height, exclusive, of this view.
      See Also:
      getBottomY(), getHeight()
      Implementation Note:
      This implementation sums up the bottom Y and the height.
      Mappings:
      Namespace Name Mixin selector
      official ag Lbtx;ag()I
      intermediary method_31600 Lnet/minecraft/class_5539;method_31600()I
      named getTopY Lnet/minecraft/world/HeightLimitView;getTopY()I
    • countVerticalSections

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

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

      default int getTopSectionCoord()
      Returns the top section coordinate, exclusive, of this view.
      Returns:
      the top section coordinate
      See Also:
      getBottomSectionCoord(), getTopY()
      Implementation Note:
      This implementation passes the top Y through ChunkSectionPos.getSectionCoord(int).
      Mappings:
      Namespace Name Mixin selector
      official aj Lbtx;aj()I
      intermediary method_31597 Lnet/minecraft/class_5539;method_31597()I
      named getTopSectionCoord Lnet/minecraft/world/HeightLimitView;getTopSectionCoord()I
    • 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:
      isOutOfHeightLimit(int)
      Mappings:
      Namespace Name Mixin selector
      official t Lbtx;t(Lfx;)Z
      intermediary method_31606 Lnet/minecraft/class_5539;method_31606(Lnet/minecraft/class_2338;)Z
      named isOutOfHeightLimit Lnet/minecraft/world/HeightLimitView;isOutOfHeightLimit(Lnet/minecraft/util/math/BlockPos;)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 or equal to the top.

      Parameters:
      y - the Y level to check
      Returns:
      true if y is out of bounds, false otherwise.
      Mappings:
      Namespace Name Mixin selector
      official d Lbtx;d(I)Z
      intermediary method_31601 Lnet/minecraft/class_5539;method_31601(I)Z
      named isOutOfHeightLimit Lnet/minecraft/world/HeightLimitView;isOutOfHeightLimit(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
      official e Lbtx;e(I)I
      intermediary method_31602 Lnet/minecraft/class_5539;method_31602(I)I
      named getSectionIndex Lnet/minecraft/world/HeightLimitView;getSectionIndex(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:
      the inverse operation sectionIndexToCoord
      Mappings:
      Namespace Name Mixin selector
      official f Lbtx;f(I)I
      intermediary method_31603 Lnet/minecraft/class_5539;method_31603(I)I
      named sectionCoordToIndex Lnet/minecraft/world/HeightLimitView;sectionCoordToIndex(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:
      the inverse operation sectionCoordToIndex
      Mappings:
      Namespace Name Mixin selector
      official g Lbtx;g(I)I
      intermediary method_31604 Lnet/minecraft/class_5539;method_31604(I)I
      named sectionIndexToCoord Lnet/minecraft/world/HeightLimitView;sectionIndexToCoord(I)I