Package net.minecraft.client.particle
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
Modifier and TypeFieldDescriptionstatic final Particle.LifetimeAlpha
private final float
The field for theendAlpha
record component.private final float
The field for theendAtNormalizedAge
record component.private final float
The field for thestartAlpha
record component.private final float
The field for thestartAtNormalizedAge
record component. -
Constructor Summary
ConstructorDescriptionLifetimeAlpha
(float startAlpha, float endAlpha, float startAtNormalizedAge, float endAtNormalizedAge) Creates an instance of aLifetimeAlpha
record class. -
Method Summary
Modifier and TypeMethodDescriptionfloat
currentAlphaForAge
(int p_323709_, int p_323623_, float p_324231_) float
endAlpha()
Returns the value of theendAlpha
record component.float
Returns the value of theendAtNormalizedAge
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.boolean
isOpaque()
float
Returns the value of thestartAlpha
record component.float
Returns the value of thestartAtNormalizedAge
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
startAlpha
private final float startAlphaThe field for thestartAlpha
record component. -
endAlpha
private final float endAlphaThe field for theendAlpha
record component. -
startAtNormalizedAge
private final float startAtNormalizedAgeThe field for thestartAtNormalizedAge
record component. -
endAtNormalizedAge
private final float endAtNormalizedAgeThe field for theendAtNormalizedAge
record component. -
ALWAYS_OPAQUE
-
-
Constructor Details
-
LifetimeAlpha
public LifetimeAlpha(float startAlpha, float endAlpha, float startAtNormalizedAge, float endAtNormalizedAge) Creates an instance of aLifetimeAlpha
record class.- Parameters:
startAlpha
- the value for thestartAlpha
record componentendAlpha
- the value for theendAlpha
record componentstartAtNormalizedAge
- the value for thestartAtNormalizedAge
record componentendAtNormalizedAge
- the value for theendAtNormalizedAge
record component
-
-
Method Details
-
isOpaque
public boolean isOpaque() -
currentAlphaForAge
public float currentAlphaForAge(int p_323709_, int p_323623_, float p_324231_) -
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. All components in this record class are compared with '=='. -
startAlpha
public float startAlpha()Returns the value of thestartAlpha
record component.- Returns:
- the value of the
startAlpha
record component
-
endAlpha
public float endAlpha()Returns the value of theendAlpha
record component.- Returns:
- the value of the
endAlpha
record component
-
startAtNormalizedAge
public float startAtNormalizedAge()Returns the value of thestartAtNormalizedAge
record component.- Returns:
- the value of the
startAtNormalizedAge
record component
-
endAtNormalizedAge
public float endAtNormalizedAge()Returns the value of theendAtNormalizedAge
record component.- Returns:
- the value of the
endAtNormalizedAge
record component
-