mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-12 18:57:32 +00:00
Fix DBC Turbo Bounceback in Liquid and Lava
This commit is contained in:
1 parent
0a6d9e1ef9
commit
aa58cf8041
1 file changed
+8
-9
@@ -66,26 +66,25 @@ public class AbilityCharge extends AbilityMovement implements IAbilityCharge {
|
||||
}
|
||||
|
||||
/**
|
||||
* Called on the first tick of windup - lock direction here so it matches telegraph.
|
||||
* During windup, NPCs face toward their target for animation purposes.
|
||||
* Players aim freely — the telegraph follows their look direction on the client,
|
||||
* and direction is locked at the end of windup in onExecute().
|
||||
*/
|
||||
@Override
|
||||
public void onWindUpTick(EntityLivingBase caster, EntityLivingBase target, int tick) {
|
||||
if (tick == 1) {
|
||||
lockDirection(caster, target);
|
||||
if (!isPlayerCaster(caster) && target != null) {
|
||||
lockDirectionToTarget(caster, target);
|
||||
enforceLockedRotation(caster);
|
||||
}
|
||||
enforceLockedRotation(caster);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onExecute(EntityLivingBase caster, EntityLivingBase target) {
|
||||
// Lock final direction at end of windup so it matches the telegraph
|
||||
lockDirection(caster, target);
|
||||
initMovement(caster, maxRange, chargeSpeed);
|
||||
hitEntities.clear();
|
||||
|
||||
// If direction wasn't set during windup (shouldn't happen), set it now
|
||||
if (movementDirection == null) {
|
||||
lockDirection(caster, target);
|
||||
}
|
||||
|
||||
enforceLockedRotation(caster);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user