Record Class CollisionResult
java.lang.Object
java.lang.Record
org.geysermc.geyser.level.physics.CollisionResult
public record CollisionResult(org.cloudburstmc.math.vector.Vector3d correctedMovement, net.kyori.adventure.util.TriState onGround)
extends Record
Holds the result of a collision check.
-
Constructor Summary
ConstructorsConstructorDescriptionCollisionResult(org.cloudburstmc.math.vector.Vector3d correctedMovement, net.kyori.adventure.util.TriState onGround) Creates an instance of aCollisionResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionorg.cloudburstmc.math.vector.Vector3dReturns the value of thecorrectedMovementrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.net.kyori.adventure.util.TriStateonGround()Returns the value of theonGroundrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
CollisionResult
public CollisionResult(org.cloudburstmc.math.vector.Vector3d correctedMovement, net.kyori.adventure.util.TriState onGround) Creates an instance of aCollisionResultrecord class.- Parameters:
correctedMovement- the value for thecorrectedMovementrecord componentonGround- the value for theonGroundrecord 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). -
correctedMovement
public org.cloudburstmc.math.vector.Vector3d correctedMovement()Returns the value of thecorrectedMovementrecord component.- Returns:
- the value of the
correctedMovementrecord component
-
onGround
public net.kyori.adventure.util.TriState onGround()Returns the value of theonGroundrecord component.- Returns:
- the value of the
onGroundrecord component
-