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

    Fields
    Modifier and Type
    Field
    Description
     
    private final float
    The field for the endAlpha record component.
    private final float
    The field for the endAtNormalizedAge record component.
    private final float
    The field for the startAlpha record component.
    private final float
    The field for the startAtNormalizedAge record component.
  • Constructor Summary

    Constructors
    Constructor
    Description
    LifetimeAlpha(float startAlpha, float endAlpha, float startAtNormalizedAge, float endAtNormalizedAge)
    Creates an instance of a LifetimeAlpha record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    float
    currentAlphaForAge(int p_323709_, int p_323623_, float p_324231_)
     
    float
    Returns the value of the endAlpha record component.
    float
    Returns the value of the endAtNormalizedAge record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    boolean
     
    float
    Returns the value of the startAlpha record component.
    float
    Returns the value of the startAtNormalizedAge record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

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

    • startAlpha

      private final float startAlpha
      The field for the startAlpha record component.
    • endAlpha

      private final float endAlpha
      The field for the endAlpha record component.
    • startAtNormalizedAge

      private final float startAtNormalizedAge
      The field for the startAtNormalizedAge record component.
    • endAtNormalizedAge

      private final float endAtNormalizedAge
      The field for the endAtNormalizedAge record component.
    • ALWAYS_OPAQUE

      public static final Particle.LifetimeAlpha ALWAYS_OPAQUE
  • Constructor Details

    • LifetimeAlpha

      public LifetimeAlpha(float startAlpha, float endAlpha, float startAtNormalizedAge, float endAtNormalizedAge)
      Creates an instance of a LifetimeAlpha record class.
      Parameters:
      startAlpha - the value for the startAlpha record component
      endAlpha - the value for the endAlpha record component
      startAtNormalizedAge - the value for the startAtNormalizedAge record component
      endAtNormalizedAge - the value for the endAtNormalizedAge record component
  • Method Details

    • isOpaque

      public boolean isOpaque()
    • currentAlphaForAge

      public float currentAlphaForAge(int p_323709_, int p_323623_, float p_324231_)
    • 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. All components in this record class 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.
    • startAlpha

      public float startAlpha()
      Returns the value of the startAlpha record component.
      Returns:
      the value of the startAlpha record component
    • endAlpha

      public float endAlpha()
      Returns the value of the endAlpha record component.
      Returns:
      the value of the endAlpha record component
    • startAtNormalizedAge

      public float startAtNormalizedAge()
      Returns the value of the startAtNormalizedAge record component.
      Returns:
      the value of the startAtNormalizedAge record component
    • endAtNormalizedAge

      public float endAtNormalizedAge()
      Returns the value of the endAtNormalizedAge record component.
      Returns:
      the value of the endAtNormalizedAge record component