mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-25 18:04:30 +00:00
Fix Windup Ticks 0 not starting Abilities
This commit is contained in:
1 parent
bc4f82e55f
commit
769109d046
4 files changed
+96
-30
No files matched your search
@@ -662,13 +662,19 @@ public abstract class Ability implements IAbility {
|
||||
// ═══════════════════════════════════════════════════════════════════
|
||||
|
||||
/**
|
||||
* Start executing this ability
|
||||
* Start executing this ability.
|
||||
* If windUpTicks is 0, skips WINDUP and goes directly to ACTIVE.
|
||||
*/
|
||||
public void start(EntityLivingBase target) {
|
||||
this.phase = AbilityPhase.WINDUP;
|
||||
this.currentTick = 0;
|
||||
this.currentTarget = target;
|
||||
this.executionStartTime = System.currentTimeMillis();
|
||||
|
||||
if (windUpTicks <= 0) {
|
||||
this.phase = AbilityPhase.ACTIVE;
|
||||
} else {
|
||||
this.phase = AbilityPhase.WINDUP;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user