Class BoundingBox

java.lang.Object
net.minecraft.world.level.levelgen.structure.BoundingBox

public class BoundingBox extends Object
  • Field Details

    • LOGGER

      private static final org.slf4j.Logger LOGGER
    • CODEC

      public static final Codec<BoundingBox> CODEC
    • STREAM_CODEC

      public static final StreamCodec<io.netty.buffer.ByteBuf, BoundingBox> STREAM_CODEC
    • minX

      private int minX
    • minY

      private int minY
    • minZ

      private int minZ
    • maxX

      private int maxX
    • maxY

      private int maxY
    • maxZ

      private int maxZ
  • Constructor Details

    • BoundingBox

      public BoundingBox(BlockPos content)
    • BoundingBox

      public BoundingBox(int minX, int minY, int minZ, int maxX, int maxY, int maxZ)
  • Method Details

    • fromCorners

      public static BoundingBox fromCorners(Vec3i pos0, Vec3i pos1)
    • infinite

      public static BoundingBox infinite()
    • orientBox

      public static BoundingBox orientBox(int footX, int footY, int footZ, int offX, int offY, int offZ, int width, int height, int depth, Direction direction)
    • intersectingChunks

      public Stream<ChunkPos> intersectingChunks()
    • intersects

      public boolean intersects(BoundingBox other)
    • intersects

      public boolean intersects(int minX, int minZ, int maxX, int maxZ)
    • encapsulatingPositions

      public static Optional<BoundingBox> encapsulatingPositions(Iterable<BlockPos> iterable)
    • encapsulatingBoxes

      public static Optional<BoundingBox> encapsulatingBoxes(Iterable<BoundingBox> iterable)
    • encapsulate

      @Deprecated public BoundingBox encapsulate(BoundingBox other)
      Deprecated.
    • encapsulating

      public static BoundingBox encapsulating(BoundingBox a, BoundingBox b)
    • encapsulate

      @Deprecated public BoundingBox encapsulate(BlockPos pos)
      Deprecated.
    • move

      @Deprecated public BoundingBox move(int dx, int dy, int dz)
      Deprecated.
    • move

      @Deprecated public BoundingBox move(Vec3i amount)
      Deprecated.
    • moved

      public BoundingBox moved(int dx, int dy, int dz)
    • inflatedBy

      public BoundingBox inflatedBy(int amountToAddAllDirections)
    • inflatedBy

      public BoundingBox inflatedBy(int inflateX, int inflateY, int inflateZ)
    • isInside

      public boolean isInside(Vec3i pos)
    • isInside

      public boolean isInside(int x, int y, int z)
    • getLength

      public Vec3i getLength()
    • getXSpan

      public int getXSpan()
    • getYSpan

      public int getYSpan()
    • getZSpan

      public int getZSpan()
    • getCenter

      public BlockPos getCenter()
    • forAllCorners

      public void forAllCorners(Consumer<BlockPos> consumer)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • minX

      public int minX()
    • minY

      public int minY()
    • minZ

      public int minZ()
    • maxX

      public int maxX()
    • maxY

      public int maxY()
    • maxZ

      public int maxZ()