Record Class AbilityProjectileLaunchData

java.lang.Object
java.lang.Record
com.hypixel.hytale.builtin.abilities.trigger.AbilityProjectileLaunchData
Record Components:
projectileConfigId - The ProjectileConfig to launch.
ignorePitch - Whether to ignore the caster's look pitch (ground waves).
pierce - Whether the projectile flies through entities.
distance - Piercing only: travel before the course ends.
lifetimeS - Piercing only: maximum flight seconds.
spectral - Whether blocks are ignored.
scale - Uniform model and hit volume scale.
speed - Multiplier on the ProjectileConfig's LaunchForce.
attributes - Resolved ability attributes to stamp onto the projectile.
onHitEffectIds - Rune-injected on-hit effects to stamp onto the projectile.
elementalCauseId - Damage cause a conversion rune re-keys the ability's elemental damage to.
trailParticleId - Optional one-shot particle system burst at the projectile's position while it travels (paints the path).
trailIntervalS - Seconds between trail bursts.
trailScale - Base scale of the trail bursts, multiplied by scale.
trailColor - Base tint of the trail bursts; an element conversion overrides it with the element's color.

public record AbilityProjectileLaunchData(@Nonnull String projectileConfigId, boolean ignorePitch, boolean pierce, double distance, float lifetimeS, boolean spectral, float scale, float speed, @Nullable Map<String,Float> attributes, @Nullable String[] onHitEffectIds, @Nullable String elementalCauseId, @Nullable String trailParticleId, float trailIntervalS, float trailScale, @Nullable Color trailColor) extends Record
Everything one ability projectile launch needs, resolved at cast time (rune attributes already folded into the values). Carries the projectile config id rather than the resolved asset so a launch stored across ticks (e.g. a split projectile's children) survives asset reloads.
  • Constructor Details

    • AbilityProjectileLaunchData

      public AbilityProjectileLaunchData(@Nonnull String projectileConfigId, boolean ignorePitch, boolean pierce, double distance, float lifetimeS, boolean spectral, float scale, float speed, @Nullable Map<String,Float> attributes, @Nullable String[] onHitEffectIds, @Nullable String elementalCauseId, @Nullable String trailParticleId, float trailIntervalS, float trailScale, @Nullable Color trailColor)
      Creates an instance of a AbilityProjectileLaunchData record class.
      Parameters:
      projectileConfigId - the value for the projectileConfigId record component
      ignorePitch - the value for the ignorePitch record component
      pierce - the value for the pierce record component
      distance - the value for the distance record component
      lifetimeS - the value for the lifetimeS record component
      spectral - the value for the spectral record component
      scale - the value for the scale record component
      speed - the value for the speed record component
      attributes - the value for the attributes record component
      onHitEffectIds - the value for the onHitEffectIds record component
      elementalCauseId - the value for the elementalCauseId record component
      trailParticleId - the value for the trailParticleId record component
      trailIntervalS - the value for the trailIntervalS record component
      trailScale - the value for the trailScale record component
      trailColor - the value for the trailColor record component
  • Method Details

    • 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 the compare method from their corresponding wrapper classes.
      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.
    • projectileConfigId

      @Nonnull public String projectileConfigId()
      Returns the value of the projectileConfigId record component.
      Returns:
      the value of the projectileConfigId record component
    • ignorePitch

      public boolean ignorePitch()
      Returns the value of the ignorePitch record component.
      Returns:
      the value of the ignorePitch record component
    • pierce

      public boolean pierce()
      Returns the value of the pierce record component.
      Returns:
      the value of the pierce record component
    • distance

      public double distance()
      Returns the value of the distance record component.
      Returns:
      the value of the distance record component
    • lifetimeS

      public float lifetimeS()
      Returns the value of the lifetimeS record component.
      Returns:
      the value of the lifetimeS record component
    • spectral

      public boolean spectral()
      Returns the value of the spectral record component.
      Returns:
      the value of the spectral record component
    • scale

      public float scale()
      Returns the value of the scale record component.
      Returns:
      the value of the scale record component
    • speed

      public float speed()
      Returns the value of the speed record component.
      Returns:
      the value of the speed record component
    • attributes

      @Nullable public Map<String,Float> attributes()
      Returns the value of the attributes record component.
      Returns:
      the value of the attributes record component
    • onHitEffectIds

      @Nullable public String[] onHitEffectIds()
      Returns the value of the onHitEffectIds record component.
      Returns:
      the value of the onHitEffectIds record component
    • elementalCauseId

      @Nullable public String elementalCauseId()
      Returns the value of the elementalCauseId record component.
      Returns:
      the value of the elementalCauseId record component
    • trailParticleId

      @Nullable public String trailParticleId()
      Returns the value of the trailParticleId record component.
      Returns:
      the value of the trailParticleId record component
    • trailIntervalS

      public float trailIntervalS()
      Returns the value of the trailIntervalS record component.
      Returns:
      the value of the trailIntervalS record component
    • trailScale

      public float trailScale()
      Returns the value of the trailScale record component.
      Returns:
      the value of the trailScale record component
    • trailColor

      @Nullable public Color trailColor()
      Returns the value of the trailColor record component.
      Returns:
      the value of the trailColor record component