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 final Leashable.Wrench -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static Leashable.Wrenchaccumulate(List<Leashable.Wrench> wrenches) 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 scale) doubletorque()Returns the value of thetorquerecord component.(package private) static doubletorqueFromForce(Vec3 leverArm, Vec3 force) 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
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
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
-