Record Class Leashable.Wrench

java.lang.Object
java.lang.Record
net.minecraft.world.entity.Leashable.Wrench
Enclosing interface:
Leashable

public static record Leashable.Wrench(Vec3 force, double torque) extends Record
  • Field Details

    • force

      private final Vec3 force
      The field for the force record component.
    • torque

      private final double torque
      The field for the torque record component.
    • ZERO

      static Leashable.Wrench ZERO
  • Constructor Details

    • Wrench

      public Wrench(Vec3 force, double torque)
      Creates an instance of a Wrench record class.
      Parameters:
      force - the value for the force record component
      torque - the value for the torque record component
  • Method Details

    • torqueFromForce

      static double torqueFromForce(Vec3 pAttachmentPoint, Vec3 pForce)
    • accumulate

      static Leashable.Wrench accumulate(List<Leashable.Wrench> pWrenches)
    • scale

      public Leashable.Wrench scale(double pScale)
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • force

      public Vec3 force()
      Returns the value of the force record component.
      Returns:
      the value of the force record component
    • torque

      public double torque()
      Returns the value of the torque record component.
      Returns:
      the value of the torque record component