Class AABB

java.lang.Object
net.minecraft.world.phys.AABB

public class AABB extends Object
  • Field Details

    • EPSILON

      private static final double EPSILON
      See Also:
    • INFINITE

      public static final AABB INFINITE
    • minX

      public final double minX
    • minY

      public final double minY
    • minZ

      public final double minZ
    • maxX

      public final double maxX
    • maxY

      public final double maxY
    • maxZ

      public final double maxZ
  • Constructor Details

    • AABB

      public AABB(double p_82295_, double p_82296_, double p_82297_, double p_82298_, double p_82299_, double p_82300_)
    • AABB

      public AABB(BlockPos p_82305_)
    • AABB

      public AABB(Vec3 p_82302_, Vec3 p_82303_)
  • Method Details

    • of

      public static AABB of(BoundingBox p_82322_)
    • unitCubeFromLowerCorner

      public static AABB unitCubeFromLowerCorner(Vec3 p_82334_)
    • encapsulatingFullBlocks

      public static AABB encapsulatingFullBlocks(BlockPos p_309165_, BlockPos p_308877_)
    • setMinX

      public AABB setMinX(double p_165881_)
    • setMinY

      public AABB setMinY(double p_165888_)
    • setMinZ

      public AABB setMinZ(double p_165890_)
    • setMaxX

      public AABB setMaxX(double p_165892_)
    • setMaxY

      public AABB setMaxY(double p_165894_)
    • setMaxZ

      public AABB setMaxZ(double p_165896_)
    • min

      public double min(Direction.Axis p_82341_)
    • max

      public double max(Direction.Axis p_82375_)
    • equals

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

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

      public AABB contract(double p_82311_, double p_82312_, double p_82313_)
    • expandTowards

      public AABB expandTowards(Vec3 p_82370_)
    • expandTowards

      public AABB expandTowards(double p_82364_, double p_82365_, double p_82366_)
    • inflate

      public AABB inflate(double p_82378_, double p_82379_, double p_82380_)
    • inflate

      public AABB inflate(double p_82401_)
    • intersect

      public AABB intersect(AABB p_82324_)
    • minmax

      public AABB minmax(AABB p_82368_)
    • move

      public AABB move(double p_82387_, double p_82388_, double p_82389_)
    • move

      public AABB move(BlockPos p_82339_)
    • move

      public AABB move(Vec3 p_82384_)
    • intersects

      public boolean intersects(AABB p_82382_)
    • intersects

      public boolean intersects(double p_82315_, double p_82316_, double p_82317_, double p_82318_, double p_82319_, double p_82320_)
    • intersects

      public boolean intersects(Vec3 p_82336_, Vec3 p_82337_)
    • contains

      public boolean contains(Vec3 p_82391_)
    • contains

      public boolean contains(double p_82394_, double p_82395_, double p_82396_)
    • getSize

      public double getSize()
    • getXsize

      public double getXsize()
    • getYsize

      public double getYsize()
    • getZsize

      public double getZsize()
    • deflate

      public AABB deflate(double p_165898_, double p_165899_, double p_165900_)
    • deflate

      public AABB deflate(double p_82407_)
    • clip

      public Optional<Vec3> clip(Vec3 p_82372_, Vec3 p_82373_)
    • clip

      @Nullable public static BlockHitResult clip(Iterable<AABB> p_82343_, Vec3 p_82344_, Vec3 p_82345_, BlockPos p_82346_)
    • getDirection

      @Nullable private static Direction getDirection(AABB p_82326_, Vec3 p_82327_, double[] p_82328_, @Nullable Direction p_82329_, double p_82330_, double p_82331_, double p_82332_)
    • clipPoint

      @Nullable private static Direction clipPoint(double[] p_82348_, @Nullable Direction p_82349_, double p_82350_, double p_82351_, double p_82352_, double p_82353_, double p_82354_, double p_82355_, double p_82356_, double p_82357_, Direction p_82358_, double p_82359_, double p_82360_, double p_82361_)
    • distanceToSqr

      public double distanceToSqr(Vec3 p_273572_)
    • toString

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

      public boolean hasNaN()
    • getCenter

      public Vec3 getCenter()
    • ofSize

      public static AABB ofSize(Vec3 p_165883_, double p_165884_, double p_165885_, double p_165886_)
    • isInfinite

      public boolean isInfinite()
      Returns true if this AABB is infinite in all directions.
      Returns:
      true if this AABB is infinite in all directions