Staff Charging Fix

This commit is contained in:
Kam committed 2026-02-28 14:04:11 -05:00
1 parent fed82bc932
commit 38df157c40
2 files changed
+22

No files matched your search

@@ -88,6 +88,15 @@ public abstract class EntityEnergyAbility extends Entity implements IEntityAddit
this.chargeDuration = duration;
}
/**
* Reset chargeTick back to chargeDuration so the charging timeout
* grace period restarts. Used by items that let the player hold
* a fully-charged orb indefinitely.
*/
public void resetChargeTick() {
this.chargeTick = this.chargeDuration;
}
public float getChargeProgress() {
if (chargeDuration <= 0) return 1.0f;
return Math.min(1.0f, (float) chargeTick / chargeDuration);