Class Box

java.lang.Object
net.minecraft.util.math.Box

public class Box extends Object
An immutable box with double-valued coordinates. The box is axis-aligned and the coordinates are minimum inclusive and maximum exclusive.

This box has proper hashCode() and equals(Object) implementations and can be used as a map key.

See Also:
Mappings:
Namespace Name
named net/minecraft/util/math/Box
intermediary net/minecraft/class_238
official evo
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private static final double
     
    final double
     
    final double
     
    final double
     
    final double
     
    final double
     
    final double
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Box(double x1, double y1, double z1, double x2, double y2, double z2)
    Creates a box of the given positions as corners.
    Creates a box that only contains the given block position.
    Box(Vec3d pos1, Vec3d pos2)
    Creates a box of the given positions as corners.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    contains(double x, double y, double z)
    Checks if the given position is in this box.
    boolean
    Checks if the given position is in this box.
    contract(double value)
     
    contract(double x, double y, double z)
     
    static Box
    Returns a box whose bounds extend to the full block between pos1 and pos2, both inclusive.
    boolean
     
    expand(double value)
     
    expand(double x, double y, double z)
     
    static Box
    from(BlockBox mutable)
     
    static Box
    from(Vec3d pos)
     
    double
     
    Returns the center position of this box.
    double
    Returns the length of this box on the X axis.
    double
    Returns the length of this box on the Y axis.
    double
    Returns the length of this box on the Z axis.
    double
    Returns the maximum coordinate for the given axis of this box.
    double
    Returns the minimum coordinate for the given axis of this box.
    int
     
    Creates the maximum box that this box and the given box contain.
    boolean
    intersects(double minX, double minY, double minZ, double maxX, double maxY, double maxZ)
    Checks if this box intersects the box of the given coordinates.
    boolean
    Checks if this box intersects the given box.
    boolean
    intersects(Vec3d pos1, Vec3d pos2)
    Checks if this box intersects the box of the given positions as corners.
    boolean
    Checks if any of the coordinates of this box are not a number.
    static Box
    of(Vec3d center, double dx, double dy, double dz)
     
    offset(double x, double y, double z)
    Creates a box that is translated by x, y, z on each axis from this box.
    offset(BlockPos blockPos)
    Creates a box that is translated by blockPos.getX(), blockPos.getY(), blockPos.getZ() on each axis from this box.
    Creates a box that is translated by vec.x, vec.y, vec.z on each axis from this box.
    raycast(Iterable<Box> boxes, Vec3d from, Vec3d to, BlockPos pos)
     
    raycast(Vec3d min, Vec3d max)
     
    shrink(double x, double y, double z)
     
    double
     
    stretch(double x, double y, double z)
     
    stretch(Vec3d scale)
     
     
    private static @Nullable Direction
    traceCollisionSide(double[] traceDistanceResult, @Nullable Direction approachDirection, double deltaX, double deltaY, double deltaZ, double begin, double minX, double maxX, double minZ, double maxZ, Direction resultDirection, double startX, double startY, double startZ)
     
    private static @Nullable Direction
    traceCollisionSide(Box box, Vec3d intersectingVector, double[] traceDistanceResult, @Nullable Direction approachDirection, double deltaX, double deltaY, double deltaZ)
     
    union(Box box)
    Creates the minimum box that contains this box and the given box.
    withMaxX(double maxX)
    Returns a new box with the maximum X provided and all other coordinates of this box.
    withMaxY(double maxY)
    Returns a new box with the maximum Y provided and all other coordinates of this box.
    withMaxZ(double maxZ)
    Returns a new box with the maximum Z provided and all other coordinates of this box.
    withMinX(double minX)
    Returns a new box with the minimum X provided and all other coordinates of this box.
    withMinY(double minY)
    Returns a new box with the minimum Y provided and all other coordinates of this box.
    withMinZ(double minZ)
    Returns a new box with the minimum Z provided and all other coordinates of this box.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • EPSILON

      private static final double EPSILON
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named EPSILON Lnet/minecraft/util/math/Box;EPSILON:D
      intermediary field_31879 Lnet/minecraft/class_238;field_31879:D
      official g Levo;g:D
    • minX

      public final double minX
      Mappings:
      Namespace Name Mixin selector
      named minX Lnet/minecraft/util/math/Box;minX:D
      intermediary field_1323 Lnet/minecraft/class_238;field_1323:D
      official a Levo;a:D
    • minY

      public final double minY
      Mappings:
      Namespace Name Mixin selector
      named minY Lnet/minecraft/util/math/Box;minY:D
      intermediary field_1322 Lnet/minecraft/class_238;field_1322:D
      official b Levo;b:D
    • minZ

      public final double minZ
      Mappings:
      Namespace Name Mixin selector
      named minZ Lnet/minecraft/util/math/Box;minZ:D
      intermediary field_1321 Lnet/minecraft/class_238;field_1321:D
      official c Levo;c:D
    • maxX

      public final double maxX
      Mappings:
      Namespace Name Mixin selector
      named maxX Lnet/minecraft/util/math/Box;maxX:D
      intermediary field_1320 Lnet/minecraft/class_238;field_1320:D
      official d Levo;d:D
    • maxY

      public final double maxY
      Mappings:
      Namespace Name Mixin selector
      named maxY Lnet/minecraft/util/math/Box;maxY:D
      intermediary field_1325 Lnet/minecraft/class_238;field_1325:D
      official e Levo;e:D
    • maxZ

      public final double maxZ
      Mappings:
      Namespace Name Mixin selector
      named maxZ Lnet/minecraft/util/math/Box;maxZ:D
      intermediary field_1324 Lnet/minecraft/class_238;field_1324:D
      official f Levo;f:D
  • Constructor Details

    • Box

      public Box(double x1, double y1, double z1, double x2, double y2, double z2)
      Creates a box of the given positions as corners.
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/util/math/Box;<init>(DDDDDD)V
      intermediary <init> Lnet/minecraft/class_238;<init>(DDDDDD)V
      official <init> Levo;<init>(DDDDDD)V
    • Box

      public Box(BlockPos pos)
      Creates a box that only contains the given block position.
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/util/math/Box;<init>(Lnet/minecraft/util/math/BlockPos;)V
      intermediary <init> Lnet/minecraft/class_238;<init>(Lnet/minecraft/class_2338;)V
      official <init> Levo;<init>(Liz;)V
    • Box

      public Box(Vec3d pos1, Vec3d pos2)
      Creates a box of the given positions as corners.
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/util/math/Box;<init>(Lnet/minecraft/util/math/Vec3d;Lnet/minecraft/util/math/Vec3d;)V
      intermediary <init> Lnet/minecraft/class_238;<init>(Lnet/minecraft/class_243;Lnet/minecraft/class_243;)V
      official <init> Levo;<init>(Levt;Levt;)V
  • Method Details

    • from

      public static Box from(BlockBox mutable)
      Mappings:
      Namespace Name Mixin selector
      named from Lnet/minecraft/util/math/Box;from(Lnet/minecraft/util/math/BlockBox;)Lnet/minecraft/util/math/Box;
      intermediary method_19316 Lnet/minecraft/class_238;method_19316(Lnet/minecraft/class_3341;)Lnet/minecraft/class_238;
      official a Levo;a(Leie;)Levo;
    • from

      public static Box from(Vec3d pos)
      Mappings:
      Namespace Name Mixin selector
      named from Lnet/minecraft/util/math/Box;from(Lnet/minecraft/util/math/Vec3d;)Lnet/minecraft/util/math/Box;
      intermediary method_29968 Lnet/minecraft/class_238;method_29968(Lnet/minecraft/class_243;)Lnet/minecraft/class_238;
      official a Levo;a(Levt;)Levo;
    • enclosing

      public static Box enclosing(BlockPos pos1, BlockPos pos2)
      Returns a box whose bounds extend to the full block between pos1 and pos2, both inclusive.
      Returns:
      a box whose bounds extend to the full block between pos1 and pos2, both inclusive
      Mappings:
      Namespace Name Mixin selector
      named enclosing Lnet/minecraft/util/math/Box;enclosing(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/util/math/Box;
      intermediary method_54784 Lnet/minecraft/class_238;method_54784(Lnet/minecraft/class_2338;Lnet/minecraft/class_2338;)Lnet/minecraft/class_238;
      official a Levo;a(Liz;Liz;)Levo;
    • withMinX

      public Box withMinX(double minX)
      Returns a new box with the minimum X provided and all other coordinates of this box.
      Returns:
      a new box with the minimum X provided and all other coordinates of this box
      Mappings:
      Namespace Name Mixin selector
      named withMinX Lnet/minecraft/util/math/Box;withMinX(D)Lnet/minecraft/util/math/Box;
      intermediary method_35574 Lnet/minecraft/class_238;method_35574(D)Lnet/minecraft/class_238;
      official a Levo;a(D)Levo;
    • withMinY

      public Box withMinY(double minY)
      Returns a new box with the minimum Y provided and all other coordinates of this box.
      Returns:
      a new box with the minimum Y provided and all other coordinates of this box
      Mappings:
      Namespace Name Mixin selector
      named withMinY Lnet/minecraft/util/math/Box;withMinY(D)Lnet/minecraft/util/math/Box;
      intermediary method_35575 Lnet/minecraft/class_238;method_35575(D)Lnet/minecraft/class_238;
      official b Levo;b(D)Levo;
    • withMinZ

      public Box withMinZ(double minZ)
      Returns a new box with the minimum Z provided and all other coordinates of this box.
      Returns:
      a new box with the minimum Z provided and all other coordinates of this box
      Mappings:
      Namespace Name Mixin selector
      named withMinZ Lnet/minecraft/util/math/Box;withMinZ(D)Lnet/minecraft/util/math/Box;
      intermediary method_35576 Lnet/minecraft/class_238;method_35576(D)Lnet/minecraft/class_238;
      official c Levo;c(D)Levo;
    • withMaxX

      public Box withMaxX(double maxX)
      Returns a new box with the maximum X provided and all other coordinates of this box.
      Returns:
      a new box with the maximum X provided and all other coordinates of this box
      Mappings:
      Namespace Name Mixin selector
      named withMaxX Lnet/minecraft/util/math/Box;withMaxX(D)Lnet/minecraft/util/math/Box;
      intermediary method_35577 Lnet/minecraft/class_238;method_35577(D)Lnet/minecraft/class_238;
      official d Levo;d(D)Levo;
    • withMaxY

      public Box withMaxY(double maxY)
      Returns a new box with the maximum Y provided and all other coordinates of this box.
      Returns:
      a new box with the maximum Y provided and all other coordinates of this box
      Mappings:
      Namespace Name Mixin selector
      named withMaxY Lnet/minecraft/util/math/Box;withMaxY(D)Lnet/minecraft/util/math/Box;
      intermediary method_35578 Lnet/minecraft/class_238;method_35578(D)Lnet/minecraft/class_238;
      official e Levo;e(D)Levo;
    • withMaxZ

      public Box withMaxZ(double maxZ)
      Returns a new box with the maximum Z provided and all other coordinates of this box.
      Returns:
      a new box with the maximum Z provided and all other coordinates of this box
      Mappings:
      Namespace Name Mixin selector
      named withMaxZ Lnet/minecraft/util/math/Box;withMaxZ(D)Lnet/minecraft/util/math/Box;
      intermediary method_35579 Lnet/minecraft/class_238;method_35579(D)Lnet/minecraft/class_238;
      official f Levo;f(D)Levo;
    • getMin

      public double getMin(Direction.Axis axis)
      Returns the minimum coordinate for the given axis of this box.
      Returns:
      the minimum coordinate for the given axis of this box
      Mappings:
      Namespace Name Mixin selector
      named getMin Lnet/minecraft/util/math/Box;getMin(Lnet/minecraft/util/math/Direction$Axis;)D
      intermediary method_1001 Lnet/minecraft/class_238;method_1001(Lnet/minecraft/class_2350$class_2351;)D
      official a Levo;a(Lje$a;)D
    • getMax

      public double getMax(Direction.Axis axis)
      Returns the maximum coordinate for the given axis of this box.
      Returns:
      the maximum coordinate for the given axis of this box
      Mappings:
      Namespace Name Mixin selector
      named getMax Lnet/minecraft/util/math/Box;getMax(Lnet/minecraft/util/math/Direction$Axis;)D
      intermediary method_990 Lnet/minecraft/class_238;method_990(Lnet/minecraft/class_2350$class_2351;)D
      official b Levo;b(Lje$a;)D
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
      Mappings:
      Namespace Name Mixin selector
      named equals Lnet/minecraft/util/math/Box;equals(Ljava/lang/Object;)Z
      intermediary equals Lnet/minecraft/class_238;equals(Ljava/lang/Object;)Z
      official equals Levo;equals(Ljava/lang/Object;)Z
    • hashCode

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

      public Box shrink(double x, double y, double z)
      Mappings:
      Namespace Name Mixin selector
      named shrink Lnet/minecraft/util/math/Box;shrink(DDD)Lnet/minecraft/util/math/Box;
      intermediary method_1002 Lnet/minecraft/class_238;method_1002(DDD)Lnet/minecraft/class_238;
      official a Levo;a(DDD)Levo;
    • stretch

      public Box stretch(Vec3d scale)
      Mappings:
      Namespace Name Mixin selector
      named stretch Lnet/minecraft/util/math/Box;stretch(Lnet/minecraft/util/math/Vec3d;)Lnet/minecraft/util/math/Box;
      intermediary method_18804 Lnet/minecraft/class_238;method_18804(Lnet/minecraft/class_243;)Lnet/minecraft/class_238;
      official b Levo;b(Levt;)Levo;
    • stretch

      public Box stretch(double x, double y, double z)
      Mappings:
      Namespace Name Mixin selector
      named stretch Lnet/minecraft/util/math/Box;stretch(DDD)Lnet/minecraft/util/math/Box;
      intermediary method_1012 Lnet/minecraft/class_238;method_1012(DDD)Lnet/minecraft/class_238;
      official b Levo;b(DDD)Levo;
    • expand

      public Box expand(double x, double y, double z)
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named expand Lnet/minecraft/util/math/Box;expand(DDD)Lnet/minecraft/util/math/Box;
      intermediary method_1009 Lnet/minecraft/class_238;method_1009(DDD)Lnet/minecraft/class_238;
      official c Levo;c(DDD)Levo;
    • expand

      public Box expand(double value)
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named expand Lnet/minecraft/util/math/Box;expand(D)Lnet/minecraft/util/math/Box;
      intermediary method_1014 Lnet/minecraft/class_238;method_1014(D)Lnet/minecraft/class_238;
      official g Levo;g(D)Levo;
    • intersection

      public Box intersection(Box box)
      Creates the maximum box that this box and the given box contain.
      Mappings:
      Namespace Name Mixin selector
      named intersection Lnet/minecraft/util/math/Box;intersection(Lnet/minecraft/util/math/Box;)Lnet/minecraft/util/math/Box;
      intermediary method_999 Lnet/minecraft/class_238;method_999(Lnet/minecraft/class_238;)Lnet/minecraft/class_238;
      official a Levo;a(Levo;)Levo;
    • union

      public Box union(Box box)
      Creates the minimum box that contains this box and the given box.
      Mappings:
      Namespace Name Mixin selector
      named union Lnet/minecraft/util/math/Box;union(Lnet/minecraft/util/math/Box;)Lnet/minecraft/util/math/Box;
      intermediary method_991 Lnet/minecraft/class_238;method_991(Lnet/minecraft/class_238;)Lnet/minecraft/class_238;
      official b Levo;b(Levo;)Levo;
    • offset

      public Box offset(double x, double y, double z)
      Creates a box that is translated by x, y, z on each axis from this box.
      Mappings:
      Namespace Name Mixin selector
      named offset Lnet/minecraft/util/math/Box;offset(DDD)Lnet/minecraft/util/math/Box;
      intermediary method_989 Lnet/minecraft/class_238;method_989(DDD)Lnet/minecraft/class_238;
      official d Levo;d(DDD)Levo;
    • offset

      public Box offset(BlockPos blockPos)
      Creates a box that is translated by blockPos.getX(), blockPos.getY(), blockPos.getZ() on each axis from this box.
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named offset Lnet/minecraft/util/math/Box;offset(Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/util/math/Box;
      intermediary method_996 Lnet/minecraft/class_238;method_996(Lnet/minecraft/class_2338;)Lnet/minecraft/class_238;
      official a Levo;a(Liz;)Levo;
    • offset

      public Box offset(Vec3d vec)
      Creates a box that is translated by vec.x, vec.y, vec.z on each axis from this box.
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named offset Lnet/minecraft/util/math/Box;offset(Lnet/minecraft/util/math/Vec3d;)Lnet/minecraft/util/math/Box;
      intermediary method_997 Lnet/minecraft/class_238;method_997(Lnet/minecraft/class_243;)Lnet/minecraft/class_238;
      official c Levo;c(Levt;)Levo;
    • intersects

      public boolean intersects(Box box)
      Checks if this box intersects the given box.
      Mappings:
      Namespace Name Mixin selector
      named intersects Lnet/minecraft/util/math/Box;intersects(Lnet/minecraft/util/math/Box;)Z
      intermediary method_994 Lnet/minecraft/class_238;method_994(Lnet/minecraft/class_238;)Z
      official c Levo;c(Levo;)Z
    • intersects

      public boolean intersects(double minX, double minY, double minZ, double maxX, double maxY, double maxZ)
      Checks if this box intersects the box of the given coordinates.
      Mappings:
      Namespace Name Mixin selector
      named intersects Lnet/minecraft/util/math/Box;intersects(DDDDDD)Z
      intermediary method_1003 Lnet/minecraft/class_238;method_1003(DDDDDD)Z
      official a Levo;a(DDDDDD)Z
    • intersects

      public boolean intersects(Vec3d pos1, Vec3d pos2)
      Checks if this box intersects the box of the given positions as corners.
      Mappings:
      Namespace Name Mixin selector
      named intersects Lnet/minecraft/util/math/Box;intersects(Lnet/minecraft/util/math/Vec3d;Lnet/minecraft/util/math/Vec3d;)Z
      intermediary method_993 Lnet/minecraft/class_238;method_993(Lnet/minecraft/class_243;Lnet/minecraft/class_243;)Z
      official a Levo;a(Levt;Levt;)Z
    • contains

      public boolean contains(Vec3d pos)
      Checks if the given position is in this box.
      Mappings:
      Namespace Name Mixin selector
      named contains Lnet/minecraft/util/math/Box;contains(Lnet/minecraft/util/math/Vec3d;)Z
      intermediary method_1006 Lnet/minecraft/class_238;method_1006(Lnet/minecraft/class_243;)Z
      official d Levo;d(Levt;)Z
    • contains

      public boolean contains(double x, double y, double z)
      Checks if the given position is in this box.
      Mappings:
      Namespace Name Mixin selector
      named contains Lnet/minecraft/util/math/Box;contains(DDD)Z
      intermediary method_1008 Lnet/minecraft/class_238;method_1008(DDD)Z
      official e Levo;e(DDD)Z
    • getAverageSideLength

      public double getAverageSideLength()
      Mappings:
      Namespace Name Mixin selector
      named getAverageSideLength Lnet/minecraft/util/math/Box;getAverageSideLength()D
      intermediary method_995 Lnet/minecraft/class_238;method_995()D
      official a Levo;a()D
    • getLengthX

      public double getLengthX()
      Returns the length of this box on the X axis.
      Returns:
      the length of this box on the X axis
      Mappings:
      Namespace Name Mixin selector
      named getLengthX Lnet/minecraft/util/math/Box;getLengthX()D
      intermediary method_17939 Lnet/minecraft/class_238;method_17939()D
      official b Levo;b()D
    • getLengthY

      public double getLengthY()
      Returns the length of this box on the Y axis.
      Returns:
      the length of this box on the Y axis
      Mappings:
      Namespace Name Mixin selector
      named getLengthY Lnet/minecraft/util/math/Box;getLengthY()D
      intermediary method_17940 Lnet/minecraft/class_238;method_17940()D
      official c Levo;c()D
    • getLengthZ

      public double getLengthZ()
      Returns the length of this box on the Z axis.
      Returns:
      the length of this box on the Z axis
      Mappings:
      Namespace Name Mixin selector
      named getLengthZ Lnet/minecraft/util/math/Box;getLengthZ()D
      intermediary method_17941 Lnet/minecraft/class_238;method_17941()D
      official d Levo;d()D
    • contract

      public Box contract(double x, double y, double z)
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named contract Lnet/minecraft/util/math/Box;contract(DDD)Lnet/minecraft/util/math/Box;
      intermediary method_35580 Lnet/minecraft/class_238;method_35580(DDD)Lnet/minecraft/class_238;
      official f Levo;f(DDD)Levo;
    • contract

      public Box contract(double value)
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named contract Lnet/minecraft/util/math/Box;contract(D)Lnet/minecraft/util/math/Box;
      intermediary method_1011 Lnet/minecraft/class_238;method_1011(D)Lnet/minecraft/class_238;
      official h Levo;h(D)Levo;
    • raycast

      public Optional<Vec3d> raycast(Vec3d min, Vec3d max)
      Mappings:
      Namespace Name Mixin selector
      named raycast Lnet/minecraft/util/math/Box;raycast(Lnet/minecraft/util/math/Vec3d;Lnet/minecraft/util/math/Vec3d;)Ljava/util/Optional;
      intermediary method_992 Lnet/minecraft/class_238;method_992(Lnet/minecraft/class_243;Lnet/minecraft/class_243;)Ljava/util/Optional;
      official b Levo;b(Levt;Levt;)Ljava/util/Optional;
    • raycast

      @Nullable public static @Nullable BlockHitResult raycast(Iterable<Box> boxes, Vec3d from, Vec3d to, BlockPos pos)
      Mappings:
      Namespace Name Mixin selector
      named raycast Lnet/minecraft/util/math/Box;raycast(Ljava/lang/Iterable;Lnet/minecraft/util/math/Vec3d;Lnet/minecraft/util/math/Vec3d;Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/util/hit/BlockHitResult;
      intermediary method_1010 Lnet/minecraft/class_238;method_1010(Ljava/lang/Iterable;Lnet/minecraft/class_243;Lnet/minecraft/class_243;Lnet/minecraft/class_2338;)Lnet/minecraft/class_3965;
      official a Levo;a(Ljava/lang/Iterable;Levt;Levt;Liz;)Levp;
    • traceCollisionSide

      @Nullable private static @Nullable Direction traceCollisionSide(Box box, Vec3d intersectingVector, double[] traceDistanceResult, @Nullable @Nullable Direction approachDirection, double deltaX, double deltaY, double deltaZ)
      Mappings:
      Namespace Name Mixin selector
      named traceCollisionSide Lnet/minecraft/util/math/Box;traceCollisionSide(Lnet/minecraft/util/math/Box;Lnet/minecraft/util/math/Vec3d;[DLnet/minecraft/util/math/Direction;DDD)Lnet/minecraft/util/math/Direction;
      intermediary method_1007 Lnet/minecraft/class_238;method_1007(Lnet/minecraft/class_238;Lnet/minecraft/class_243;[DLnet/minecraft/class_2350;DDD)Lnet/minecraft/class_2350;
      official a Levo;a(Levo;Levt;[DLje;DDD)Lje;
    • traceCollisionSide

      @Nullable private static @Nullable Direction traceCollisionSide(double[] traceDistanceResult, @Nullable @Nullable Direction approachDirection, double deltaX, double deltaY, double deltaZ, double begin, double minX, double maxX, double minZ, double maxZ, Direction resultDirection, double startX, double startY, double startZ)
      Mappings:
      Namespace Name Mixin selector
      named traceCollisionSide Lnet/minecraft/util/math/Box;traceCollisionSide([DLnet/minecraft/util/math/Direction;DDDDDDDDLnet/minecraft/util/math/Direction;DDD)Lnet/minecraft/util/math/Direction;
      intermediary method_998 Lnet/minecraft/class_238;method_998([DLnet/minecraft/class_2350;DDDDDDDDLnet/minecraft/class_2350;DDD)Lnet/minecraft/class_2350;
      official a Levo;a([DLje;DDDDDDDDLje;DDD)Lje;
    • squaredMagnitude

      public double squaredMagnitude(Vec3d pos)
      Mappings:
      Namespace Name Mixin selector
      named squaredMagnitude Lnet/minecraft/util/math/Box;squaredMagnitude(Lnet/minecraft/util/math/Vec3d;)D
      intermediary method_49271 Lnet/minecraft/class_238;method_49271(Lnet/minecraft/class_243;)D
      official e Levo;e(Levt;)D
    • toString

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

      public boolean isNaN()
      Checks if any of the coordinates of this box are not a number.
      Mappings:
      Namespace Name Mixin selector
      named isNaN Lnet/minecraft/util/math/Box;isNaN()Z
      intermediary method_1013 Lnet/minecraft/class_238;method_1013()Z
      official e Levo;e()Z
    • getCenter

      public Vec3d getCenter()
      Returns the center position of this box.
      Mappings:
      Namespace Name Mixin selector
      named getCenter Lnet/minecraft/util/math/Box;getCenter()Lnet/minecraft/util/math/Vec3d;
      intermediary method_1005 Lnet/minecraft/class_238;method_1005()Lnet/minecraft/class_243;
      official f Levo;f()Levt;
    • of

      public static Box of(Vec3d center, double dx, double dy, double dz)
      Mappings:
      Namespace Name Mixin selector
      named of Lnet/minecraft/util/math/Box;of(Lnet/minecraft/util/math/Vec3d;DDD)Lnet/minecraft/util/math/Box;
      intermediary method_30048 Lnet/minecraft/class_238;method_30048(Lnet/minecraft/class_243;DDD)Lnet/minecraft/class_238;
      official a Levo;a(Levt;DDD)Levo;