Record Class Particle.LifetimeAlpha
java.lang.Object
java.lang.Record
net.minecraft.client.particle.Particle.LifetimeAlpha
- Enclosing class:
Particle
public static record Particle.LifetimeAlpha(float startAlpha, float endAlpha, float startAtNormalizedAge, float endAtNormalizedAge)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Particle.LifetimeAlphaprivate final floatThe field for theendAlpharecord component.private final floatThe field for theendAtNormalizedAgerecord component.private final floatThe field for thestartAlpharecord component.private final floatThe field for thestartAtNormalizedAgerecord component. -
Constructor Summary
ConstructorsConstructorDescriptionLifetimeAlpha(float startAlpha, float endAlpha, float startAtNormalizedAge, float endAtNormalizedAge) Creates an instance of aLifetimeAlpharecord class. -
Method Summary
Modifier and TypeMethodDescriptionfloatcurrentAlphaForAge(int age, int lifetime, float partialTickTime) floatendAlpha()Returns the value of theendAlpharecord component.floatReturns the value of theendAtNormalizedAgerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanisOpaque()floatReturns the value of thestartAlpharecord component.floatReturns the value of thestartAtNormalizedAgerecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
startAlpha
private final float startAlphaThe field for thestartAlpharecord component. -
endAlpha
private final float endAlphaThe field for theendAlpharecord component. -
startAtNormalizedAge
private final float startAtNormalizedAgeThe field for thestartAtNormalizedAgerecord component. -
endAtNormalizedAge
private final float endAtNormalizedAgeThe field for theendAtNormalizedAgerecord component. -
ALWAYS_OPAQUE
-
-
Constructor Details
-
LifetimeAlpha
public LifetimeAlpha(float startAlpha, float endAlpha, float startAtNormalizedAge, float endAtNormalizedAge) Creates an instance of aLifetimeAlpharecord class.- Parameters:
startAlpha- the value for thestartAlpharecord componentendAlpha- the value for theendAlpharecord componentstartAtNormalizedAge- the value for thestartAtNormalizedAgerecord componentendAtNormalizedAge- the value for theendAtNormalizedAgerecord component
-
-
Method Details
-
isOpaque
public boolean isOpaque() -
currentAlphaForAge
public float currentAlphaForAge(int age, int lifetime, float partialTickTime) -
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. All components in this record class are compared with thecomparemethod from their corresponding wrapper classes. -
startAlpha
public float startAlpha()Returns the value of thestartAlpharecord component.- Returns:
- the value of the
startAlpharecord component
-
endAlpha
public float endAlpha()Returns the value of theendAlpharecord component.- Returns:
- the value of the
endAlpharecord component
-
startAtNormalizedAge
public float startAtNormalizedAge()Returns the value of thestartAtNormalizedAgerecord component.- Returns:
- the value of the
startAtNormalizedAgerecord component
-
endAtNormalizedAge
public float endAtNormalizedAge()Returns the value of theendAtNormalizedAgerecord component.- Returns:
- the value of the
endAtNormalizedAgerecord component
-