Record Class CollisionBox
java.lang.Object
java.lang.Record
com.zenith.mc.block.CollisionBox
public record CollisionBox(double minX, double maxX, double minY, double maxY, double minZ, double maxZ)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionCollisionBox(double minX, double maxX, double minY, double maxY, double minZ, double maxZ) Creates an instance of aCollisionBoxrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanintersects(CollisionBox collisionBox) booleandoublemaxX()Returns the value of themaxXrecord component.doublemaxY()Returns the value of themaxYrecord component.doublemaxZ()Returns the value of themaxZrecord component.doubleminX()Returns the value of theminXrecord component.doubleminY()Returns the value of theminYrecord component.doubleminZ()Returns the value of theminZrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
CollisionBox
public CollisionBox(double minX, double maxX, double minY, double maxY, double minZ, double maxZ) Creates an instance of aCollisionBoxrecord class.- Parameters:
minX- the value for theminXrecord componentmaxX- the value for themaxXrecord componentminY- the value for theminYrecord componentmaxY- the value for themaxYrecord componentminZ- the value for theminZrecord componentmaxZ- the value for themaxZrecord component
-
-
Method Details
-
intersects
-
isFullBlock
public boolean isFullBlock() -
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with thecomparemethod from their corresponding wrapper classes. -
minX
public double minX()Returns the value of theminXrecord component.- Returns:
- the value of the
minXrecord component
-
maxX
public double maxX()Returns the value of themaxXrecord component.- Returns:
- the value of the
maxXrecord component
-
minY
public double minY()Returns the value of theminYrecord component.- Returns:
- the value of the
minYrecord component
-
maxY
public double maxY()Returns the value of themaxYrecord component.- Returns:
- the value of the
maxYrecord component
-
minZ
public double minZ()Returns the value of theminZrecord component.- Returns:
- the value of the
minZrecord component
-
maxZ
public double maxZ()Returns the value of themaxZrecord component.- Returns:
- the value of the
maxZrecord component
-