Class AbilityProjectileConfig

java.lang.Object
com.hypixel.hytale.builtin.abilities.trigger.AbilityProjectileConfig
All Implemented Interfaces:
AbilityAttributeBinding

public class AbilityProjectileConfig extends Object implements AbilityAttributeBinding
The authored definition of an ability projectile, shared by every interaction that launches one: the codec keys are declared once here (appendCodec(BuilderCodec.BuilderBase, Function)) and appear flat on the authoring node, and resolve(ImpactModifiers) folds rune attributes into a AbilityProjectileLaunchData for AbilityProjectileLauncher.
  • Constructor Details

    • AbilityProjectileConfig

      public AbilityProjectileConfig()
    • AbilityProjectileConfig

      public AbilityProjectileConfig(boolean ignorePitch, boolean pierce)
      Parameters:
      ignorePitch - The default when the node does not author IgnorePitch.
      pierce - The default when the node does not author Pierce.
  • Method Details

    • appendCodec

      public static <T> void appendCodec(@Nonnull BuilderCodec.BuilderBase<T,?> builder, @Nonnull Function<T, AbilityProjectileConfig> config)
      Declares the config's authoring keys on an interaction codec, flat on the node.
      Parameters:
      builder - The interaction's codec builder.
      config - How to reach the interaction's config instance.
    • resolve

      @Nullable public AbilityProjectileLaunchData resolve(@Nullable ImpactModifiers impactModifiers)
      Folds the caster's resolved rune attributes into the authored values.
      Returns:
      the launch, or null when no projectile is authored.
    • getProjectileConfigId

      @Nullable public String getProjectileConfigId()
    • collectAbilityAttributes

      public void collectAbilityAttributes(@Nonnull Consumer<String> out)
      Description copied from interface: AbilityAttributeBinding
      Passes every attribute name this config binds to out.
      Specified by:
      collectAbilityAttributes in interface AbilityAttributeBinding