Record Class ParticleSettings

java.lang.Object
java.lang.Record
foundry.veil.api.quasar.data.ParticleSettings

public record ParticleSettings(float particleSpeed, float particleSize, float particleSizeVariation, int particleLifetime, float particleLifetimeVariation, org.joml.Vector3fc initialDirection, boolean randomInitialDirection, boolean randomInitialRotation, boolean randomSpeed, boolean randomSize, boolean randomLifetime) extends Record
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final com.mojang.serialization.Codec<net.minecraft.core.Holder<ParticleSettings>>
     
    static final com.mojang.serialization.Codec<ParticleSettings>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    ParticleSettings(float particleSpeed, float particleSize, float particleSizeVariation, int particleLifetime, float particleLifetimeVariation, org.joml.Vector3fc initialDirection, boolean randomInitialDirection, boolean randomInitialRotation, boolean randomSpeed, boolean randomSize, boolean randomLifetime)
    Creates an instance of a ParticleSettings record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    @Nullable net.minecraft.resources.ResourceLocation
     
    final int
    Returns a hash code value for this object.
    org.joml.Vector3fc
    Returns the value of the initialDirection record component.
    org.joml.Vector3fc
    initialDirection(net.minecraft.util.RandomSource random)
     
    org.joml.Vector3f
    particleDirection(net.minecraft.util.RandomSource random)
     
    int
    Returns the value of the particleLifetime record component.
    int
    particleLifetime(net.minecraft.util.RandomSource random)
     
    float
    Returns the value of the particleLifetimeVariation record component.
    float
    Returns the value of the particleSize record component.
    float
    particleSize(net.minecraft.util.RandomSource random)
     
    float
    Returns the value of the particleSizeVariation record component.
    float
    Returns the value of the particleSpeed record component.
    float
    particleSpeed(net.minecraft.util.RandomSource random)
     
    boolean
    Returns the value of the randomInitialDirection record component.
    boolean
    Returns the value of the randomInitialRotation record component.
    boolean
    Returns the value of the randomLifetime record component.
    boolean
    Returns the value of the randomSize record component.
    boolean
    Returns the value of the randomSpeed 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

    • DIRECT_CODEC

      public static final com.mojang.serialization.Codec<ParticleSettings> DIRECT_CODEC
    • CODEC

      public static final com.mojang.serialization.Codec<net.minecraft.core.Holder<ParticleSettings>> CODEC
  • Constructor Details

    • ParticleSettings

      public ParticleSettings(float particleSpeed, float particleSize, float particleSizeVariation, int particleLifetime, float particleLifetimeVariation, org.joml.Vector3fc initialDirection, boolean randomInitialDirection, boolean randomInitialRotation, boolean randomSpeed, boolean randomSize, boolean randomLifetime)
      Creates an instance of a ParticleSettings record class.
      Parameters:
      particleSpeed - the value for the particleSpeed record component
      particleSize - the value for the particleSize record component
      particleSizeVariation - the value for the particleSizeVariation record component
      particleLifetime - the value for the particleLifetime record component
      particleLifetimeVariation - the value for the particleLifetimeVariation record component
      initialDirection - the value for the initialDirection record component
      randomInitialDirection - the value for the randomInitialDirection record component
      randomInitialRotation - the value for the randomInitialRotation record component
      randomSpeed - the value for the randomSpeed record component
      randomSize - the value for the randomSize record component
      randomLifetime - the value for the randomLifetime record component
  • Method Details

    • particleSpeed

      public float particleSpeed(net.minecraft.util.RandomSource random)
    • particleSize

      public float particleSize(net.minecraft.util.RandomSource random)
    • particleLifetime

      public int particleLifetime(net.minecraft.util.RandomSource random)
    • initialDirection

      public org.joml.Vector3fc initialDirection(net.minecraft.util.RandomSource random)
    • particleDirection

      public org.joml.Vector3f particleDirection(net.minecraft.util.RandomSource random)
    • getRegistryId

      @Nullable public @Nullable net.minecraft.resources.ResourceLocation getRegistryId()
    • 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 '=='.
      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.
    • particleSpeed

      public float particleSpeed()
      Returns the value of the particleSpeed record component.
      Returns:
      the value of the particleSpeed record component
    • particleSize

      public float particleSize()
      Returns the value of the particleSize record component.
      Returns:
      the value of the particleSize record component
    • particleSizeVariation

      public float particleSizeVariation()
      Returns the value of the particleSizeVariation record component.
      Returns:
      the value of the particleSizeVariation record component
    • particleLifetime

      public int particleLifetime()
      Returns the value of the particleLifetime record component.
      Returns:
      the value of the particleLifetime record component
    • particleLifetimeVariation

      public float particleLifetimeVariation()
      Returns the value of the particleLifetimeVariation record component.
      Returns:
      the value of the particleLifetimeVariation record component
    • initialDirection

      public org.joml.Vector3fc initialDirection()
      Returns the value of the initialDirection record component.
      Returns:
      the value of the initialDirection record component
    • randomInitialDirection

      public boolean randomInitialDirection()
      Returns the value of the randomInitialDirection record component.
      Returns:
      the value of the randomInitialDirection record component
    • randomInitialRotation

      public boolean randomInitialRotation()
      Returns the value of the randomInitialRotation record component.
      Returns:
      the value of the randomInitialRotation record component
    • randomSpeed

      public boolean randomSpeed()
      Returns the value of the randomSpeed record component.
      Returns:
      the value of the randomSpeed record component
    • randomSize

      public boolean randomSize()
      Returns the value of the randomSize record component.
      Returns:
      the value of the randomSize record component
    • randomLifetime

      public boolean randomLifetime()
      Returns the value of the randomLifetime record component.
      Returns:
      the value of the randomLifetime record component