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.entity.EntityType<?> entity)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionMotionData(float power, float roll, double gravity, float airDrag, float waterDrag, net.minecraft.entity.EntityType<?> entity) Creates an instance of aMotionDatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionfloatairDrag()Returns the value of theairDragrecord component.net.minecraft.entity.EntityType<?> entity()Returns the value of theentityrecord component.final booleanIndicates whether some other object is "equal to" this one.doublegravity()Returns the value of thegravityrecord component.final inthashCode()Returns a hash code value for this object.floatpower()Returns the value of thepowerrecord component.floatroll()Returns the value of therollrecord component.final StringtoString()Returns a string representation of this record class.floatReturns the value of thewaterDragrecord component.withPower(float power)
-
Constructor Details
-
MotionData
public MotionData(float power, float roll, double gravity, float airDrag, float waterDrag, net.minecraft.entity.EntityType<?> entity) Creates an instance of aMotionDatarecord class.- Parameters:
power- the value for thepowerrecord componentroll- the value for therollrecord componentgravity- the value for thegravityrecord componentairDrag- the value for theairDragrecord componentwaterDrag- the value for thewaterDragrecord componententity- the value for theentityrecord component
-
-
Method Details
-
withPower
-
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 '=='. -
power
public float power()Returns the value of thepowerrecord component.- Returns:
- the value of the
powerrecord component
-
roll
public float roll()Returns the value of therollrecord component.- Returns:
- the value of the
rollrecord component
-
gravity
public double gravity()Returns the value of thegravityrecord component.- Returns:
- the value of the
gravityrecord component
-
airDrag
public float airDrag()Returns the value of theairDragrecord component.- Returns:
- the value of the
airDragrecord component
-
waterDrag
public float waterDrag()Returns the value of thewaterDragrecord component.- Returns:
- the value of the
waterDragrecord component
-
entity
public net.minecraft.entity.EntityType<?> entity()Returns the value of theentityrecord component.- Returns:
- the value of the
entityrecord component
-