Record Class GrabInteraction.GrabResult
java.lang.Object
java.lang.Record
net.timtaran.interactivemc.body.player.interaction.GrabInteraction.GrabResult
- Record Components:
grabbedBody- the body that was grabbedgrabConstraint- the grab constraint that was created
- Enclosing class:
GrabInteraction
public static record GrabInteraction.GrabResult(@NotNull net.xmx.velthoric.core.body.VxBody grabbedBody, @Nullable net.xmx.velthoric.core.constraint.VxConstraint grabConstraint)
extends Record
Result of a grab attempt.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionGrabResult(@NotNull net.xmx.velthoric.core.body.VxBody grabbedBody, @Nullable net.xmx.velthoric.core.constraint.VxConstraint grabConstraint) Creates an instance of aGrabResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.@NotNull net.xmx.velthoric.core.body.VxBodyReturns the value of thegrabbedBodyrecord component.@Nullable net.xmx.velthoric.core.constraint.VxConstraintReturns the value of thegrabConstraintrecord component.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
GrabResult
public GrabResult(@NotNull @NotNull net.xmx.velthoric.core.body.VxBody grabbedBody, @Nullable @Nullable net.xmx.velthoric.core.constraint.VxConstraint grabConstraint) Creates an instance of aGrabResultrecord class.- Parameters:
grabbedBody- the value for thegrabbedBodyrecord componentgrabConstraint- the value for thegrabConstraintrecord 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). -
grabbedBody
@NotNull public @NotNull net.xmx.velthoric.core.body.VxBody grabbedBody()Returns the value of thegrabbedBodyrecord component.- Returns:
- the value of the
grabbedBodyrecord component
-
grabConstraint
@Nullable public @Nullable net.xmx.velthoric.core.constraint.VxConstraint grabConstraint()Returns the value of thegrabConstraintrecord component.- Returns:
- the value of the
grabConstraintrecord component
-