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 Vec3The field for theforcerecord component.private final doubleThe field for thetorquerecord component.(package private) static Leashable.Wrench -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static Leashable.Wrenchaccumulate(List<Leashable.Wrench> pWrenches) final booleanIndicates whether some other object is "equal to" this one.force()Returns the value of theforcerecord component.final inthashCode()Returns a hash code value for this object.scale(double pScale) doubletorque()Returns the value of thetorquerecord component.(package private) static doubletorqueFromForce(Vec3 pAttachmentPoint, Vec3 pForce) final StringtoString()Returns a string representation of this record class.
-
Field Details
-
force
The field for theforcerecord component. -
torque
private final double torqueThe field for thetorquerecord component. -
ZERO
-
-
Constructor Details
-
Wrench
Creates an instance of aWrenchrecord class.- Parameters:
force- the value for theforcerecord componenttorque- the value for thetorquerecord 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 theforcerecord component.- Returns:
- the value of the
forcerecord component
-
torque
public double torque()Returns the value of thetorquerecord component.- Returns:
- the value of the
torquerecord component
-