Contents
Class PulledByAbility
java.lang.Object
com.hypixel.hytale.builtin.abilities.trigger.PulledByAbility
- All Implemented Interfaces:
Component<EntityStore>, Cloneable
Marks an entity being reeled toward a caster (e.g. by a chain ability). Consumed by
AbilityPullSystem: after an optional hooked delay, the victim is dragged for a
FIXED reel time — the required speed is recomputed every tick from the remaining
distance and time, so a far victim arrives as fast as a near one and per-role
knockback scaling or AI fighting the cable cannot stretch the trip.-
Field Summary
Fields inherited from interface Component
EMPTY_ARRAY -
Constructor Summary
ConstructorsConstructorDescriptionPulledByAbility(Ref<EntityStore> casterRef, float reelTimeS, float arc, float stopRange, float delayS) -
Method Summary
Modifier and TypeMethodDescriptionbooleanadvance(float dt) Counts the reel down toward its overall timeout.booleanadvanceDelay(float dt) Counts the hooked delay down.clone()doublegetArcOffset(double horizontalDistance) Resolves the upward bow of the aim point this tick.static ComponentType<EntityStore, PulledByAbility> floatfloattickReelSpeed(double distance, float dt) Advances the reel clock and returns the speed this tick needs: the remaining distance over the remaining reel time.Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Component
cloneSerializable
-
Constructor Details
-
PulledByAbility
public PulledByAbility(@Nonnull Ref<EntityStore> casterRef, float reelTimeS, float arc, float stopRange, float delayS)
-
-
Method Details
-
getComponentType
-
getCasterRef
-
getStopRange
public float getStopRange() -
getArcOffset
public double getArcOffset(double horizontalDistance) Resolves the upward bow of the aim point this tick. The easing runs on HORIZONTAL progress — height gained must not keep the bow alive, or lifting feeds back into more lifting — and the offset is capped by the horizontal distance left, so the approach can never turn mostly vertical. -
advance
public boolean advance(float dt) Counts the reel down toward its overall timeout.- Returns:
truewhile the pull may keep running.
-
advanceDelay
public boolean advanceDelay(float dt) Counts the hooked delay down.- Returns:
truewhile the reel has not started yet.
-
tickReelSpeed
public float tickReelSpeed(double distance, float dt) Advances the reel clock and returns the speed this tick needs: the remaining distance over the remaining reel time. Losses (role knockback scaling, AI walking against the cable, friction) leave more distance for less time, so the next tick demands proportionally more — arrival stays on schedule up to the speed cap. -
clone
- Specified by:
clonein interfaceComponent<EntityStore>- Returns:
- a clone instance of the original component instance.
-