mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-17 19:15:11 +00:00
Refactoring for Code Cleanup and Projectile Abstract Class Handling
This commit is contained in:
1 parent
a1f3f5184b
commit
a23b199e7e
30 files changed
+1226
-2395
No files matched your search
@@ -161,7 +161,7 @@ public class PlayerAbilityData implements IPlayerAbilityData {
|
||||
playAbilitySound(player, currentAbility.getWindUpSound());
|
||||
playAbilityAnimation(currentAbility.getWindUpAnimation());
|
||||
}
|
||||
currentAbility.onWindUpTick(player, currentTarget, player.worldObj, currentAbility.getCurrentTick());
|
||||
currentAbility.onWindUpTick(player, currentTarget, currentAbility.getCurrentTick());
|
||||
break;
|
||||
|
||||
case ACTIVE:
|
||||
@@ -170,7 +170,10 @@ public class PlayerAbilityData implements IPlayerAbilityData {
|
||||
for (TelegraphInstance telegraph : currentAbility.getTelegraphInstances()) {
|
||||
telegraph.lockPosition();
|
||||
}
|
||||
removeTelegraph(currentAbility, player);
|
||||
// Remove telegraph unless the ability keeps it during active phase
|
||||
if (!currentAbility.keepTelegraphDuringActive()) {
|
||||
removeTelegraph(currentAbility, player);
|
||||
}
|
||||
|
||||
// Handle rotation control transition from WINDUP to ACTIVE
|
||||
if (currentAbility.isRotationLockedDuringActive()) {
|
||||
@@ -195,20 +198,28 @@ public class PlayerAbilityData implements IPlayerAbilityData {
|
||||
playAbilityAnimation(currentAbility.getActiveAnimation());
|
||||
|
||||
// Call onExecute
|
||||
currentAbility.onExecute(player, currentTarget, player.worldObj);
|
||||
currentAbility.onExecute(player, currentTarget);
|
||||
|
||||
if (currentAbility.getPhase() == AbilityPhase.IDLE) {
|
||||
handleAbilityCompletion(player);
|
||||
return;
|
||||
}
|
||||
}
|
||||
currentAbility.onActiveTick(player, currentTarget, player.worldObj, currentAbility.getCurrentTick());
|
||||
currentAbility.onActiveTick(player, currentTarget, currentAbility.getCurrentTick());
|
||||
|
||||
if (currentAbility.getPhase() == AbilityPhase.IDLE) {
|
||||
handleAbilityCompletion(player);
|
||||
return;
|
||||
}
|
||||
|
||||
// Auto-complete for burst overlap mode (entities fly independently)
|
||||
if (currentAbility.isBurstEnabled() && currentAbility.isBurstOverlap()
|
||||
&& currentAbility.getBurstIndex() < currentAbility.getBurstAmount()
|
||||
&& currentAbility.getPhase() == AbilityPhase.ACTIVE
|
||||
&& currentAbility.isReadyForBurstCompletion(currentAbility.getCurrentTick())) {
|
||||
currentAbility.signalCompletion();
|
||||
}
|
||||
|
||||
// Release locks during burst delay
|
||||
if (currentAbility.getPhase() == AbilityPhase.BURST_DELAY) {
|
||||
if (rotationLocked) releaseRotationControl();
|
||||
@@ -348,7 +359,7 @@ public class PlayerAbilityData implements IPlayerAbilityData {
|
||||
playAbilityAnimation(ability.getActiveAnimation());
|
||||
|
||||
// Call onExecute
|
||||
ability.onExecute(player, currentTarget, player.worldObj);
|
||||
ability.onExecute(player, currentTarget);
|
||||
|
||||
// Check if ability completed during onExecute
|
||||
if (ability.getPhase() == AbilityPhase.IDLE) {
|
||||
|
||||
Reference in new issue
Block a user