Class AbilityEntityRepeat

java.lang.Object
com.hypixel.hytale.builtin.abilities.entity.AbilityEntityRepeat
All Implemented Interfaces:
Component<EntityStore>, Cloneable

public class AbilityEntityRepeat extends Object implements Component<EntityStore>
Makes an ability entity (e.g. a tornado) re-run its authored chains at fixed intervals for as long as it lives. Each repeat has its own cadence, so a fast pull and a slow damage tick can coexist. The chains run on the entity's own interaction manager as a proxy context: the caster stays the owner, so damage credit and rune modifiers resolve as if the caster had cast directly.
  • Constructor Details

    • AbilityEntityRepeat

      public AbilityEntityRepeat(@Nonnull Ref<EntityStore> casterRef, @Nonnull String[] chainRootIds, @Nonnull float[] intervals)
  • Method Details

    • getComponentType

      public static ComponentType<EntityStore, AbilityEntityRepeat> getComponentType()
    • getCasterRef

      @Nonnull public Ref<EntityStore> getCasterRef()
    • getRepeatCount

      public int getRepeatCount()
    • getChainRootId

      @Nonnull public String getChainRootId(int index)
    • advanceAndCheckRepeat

      public boolean advanceAndCheckRepeat(int index, float dt)
      Counts one repeat down toward its next run.
      Parameters:
      index - The repeat index.
      dt - The tick delta in seconds.
      Returns:
      true when the repeat is due this tick.
    • clone

      @Nullable public Component<EntityStore> clone()
      Specified by:
      clone in interface Component<EntityStore>
      Returns:
      a clone instance of the original component instance.