Record Class ProjectileEntitySimulator.MotionData

java.lang.Object
java.lang.Record
meteordevelopment.meteorclient.utils.entity.simulator.ProjectileEntitySimulator.MotionData
Enclosing class:
ProjectileEntitySimulator

public static record ProjectileEntitySimulator.MotionData(float power, float roll, double gravity, float airDrag, float waterDrag, net.minecraft.world.entity.EntityType<?> entity) extends Record
  • Constructor Summary

    Constructors
    Constructor
    Description
    MotionData(float power, float roll, double gravity, float airDrag, float waterDrag, net.minecraft.world.entity.EntityType<?> entity)
    Creates an instance of a MotionData record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    float
    Returns the value of the airDrag record component.
    net.minecraft.world.entity.EntityType<?>
    Returns the value of the entity record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    double
    Returns the value of the gravity record component.
    final int
    Returns a hash code value for this object.
    float
    Returns the value of the power record component.
    float
    Returns the value of the roll record component.
    final String
    Returns a string representation of this record class.
    float
    Returns the value of the waterDrag record component.
    withPower(float power)
     

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • MotionData

      public MotionData(float power, float roll, double gravity, float airDrag, float waterDrag, net.minecraft.world.entity.EntityType<?> entity)
      Creates an instance of a MotionData record class.
      Parameters:
      power - the value for the power record component
      roll - the value for the roll record component
      gravity - the value for the gravity record component
      airDrag - the value for the airDrag record component
      waterDrag - the value for the waterDrag record component
      entity - the value for the entity record component
  • Method Details

    • withPower

      public ProjectileEntitySimulator.MotionData withPower(float power)
    • 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 the compare method from their corresponding wrapper classes.
      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.
    • power

      public float power()
      Returns the value of the power record component.
      Returns:
      the value of the power record component
    • roll

      public float roll()
      Returns the value of the roll record component.
      Returns:
      the value of the roll record component
    • gravity

      public double gravity()
      Returns the value of the gravity record component.
      Returns:
      the value of the gravity record component
    • airDrag

      public float airDrag()
      Returns the value of the airDrag record component.
      Returns:
      the value of the airDrag record component
    • waterDrag

      public float waterDrag()
      Returns the value of the waterDrag record component.
      Returns:
      the value of the waterDrag record component
    • entity

      public net.minecraft.world.entity.EntityType<?> entity()
      Returns the value of the entity record component.
      Returns:
      the value of the entity record component