mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-21 02:12:19 +00:00
Add Max to Energy Entities to prevent any long-term issues / errors
This commit is contained in:
1 parent
e330b517a8
commit
6fdf9daf24
21 files changed
+102
-48
No files matched your search
@@ -174,6 +174,13 @@ public abstract class EntityEnergyBarrier extends EntityEnergyAbility {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Absolute hard lifetime cap (safety net for barriers with no duration)
|
||||
if (ticksAlive > BARRIER_HARD_LIFETIME_CAP) {
|
||||
onBarrierDestroyed();
|
||||
this.setDead();
|
||||
return true;
|
||||
}
|
||||
|
||||
// Reset hit flash
|
||||
if (getHitFlash() > 0) {
|
||||
setHitFlash((byte) (getHitFlash() - 1));
|
||||
|
||||
Reference in new issue
Block a user