Package ac.boar.anticheat.collision
Record Class CollisionRecord
java.lang.Object
java.lang.Record
ac.boar.anticheat.collision.CollisionRecord
public record CollisionRecord(Box shape, BoarBlockState blockState, org.cloudburstmc.math.vector.Vector3i sourcePosition)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionCollisionRecord(Box shape, BoarBlockState blockState, org.cloudburstmc.math.vector.Vector3i sourcePosition) Creates an instance of aCollisionRecordrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theblockStaterecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.shape()Returns the value of theshaperecord component.org.cloudburstmc.math.vector.Vector3iReturns the value of thesourcePositionrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
CollisionRecord
public CollisionRecord(Box shape, BoarBlockState blockState, org.cloudburstmc.math.vector.Vector3i sourcePosition) Creates an instance of aCollisionRecordrecord class.- Parameters:
shape- the value for theshaperecord componentblockState- the value for theblockStaterecord componentsourcePosition- the value for thesourcePositionrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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 withObjects::equals(Object,Object). -
shape
Returns the value of theshaperecord component.- Returns:
- the value of the
shaperecord component
-
blockState
Returns the value of theblockStaterecord component.- Returns:
- the value of the
blockStaterecord component
-
sourcePosition
public org.cloudburstmc.math.vector.Vector3i sourcePosition()Returns the value of thesourcePositionrecord component.- Returns:
- the value of the
sourcePositionrecord component
-