Package net.minecraft.world.entity
Record Class Leashable.Wrench
java.lang.Object
java.lang.Record
net.minecraft.world.entity.Leashable.Wrench
- Enclosing interface:
Leashable
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Vec3
The field for theforce
record component.private final double
The field for thetorque
record component.(package private) static Leashable.Wrench
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static Leashable.Wrench
accumulate
(List<Leashable.Wrench> pWrenches) final boolean
Indicates whether some other object is "equal to" this one.force()
Returns the value of theforce
record component.final int
hashCode()
Returns a hash code value for this object.scale
(double pScale) double
torque()
Returns the value of thetorque
record component.(package private) static double
torqueFromForce
(Vec3 pAttachmentPoint, Vec3 pForce) final String
toString()
Returns a string representation of this record class.
-
Field Details
-
force
The field for theforce
record component. -
torque
private final double torqueThe field for thetorque
record component. -
ZERO
-
-
Constructor Details
-
Wrench
Creates an instance of aWrench
record class.- Parameters:
force
- the value for theforce
record componenttorque
- the value for thetorque
record component
-
-
Method Details
-
torqueFromForce
-
accumulate
-
scale
-
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. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
force
Returns the value of theforce
record component.- Returns:
- the value of the
force
record component
-
torque
public double torque()Returns the value of thetorque
record component.- Returns:
- the value of the
torque
record component
-