new Regen
This commit is contained in:
@@ -5147,26 +5147,26 @@ public class PlayerCharacter extends AbstractCharacter {
|
||||
forceRespawn(this);
|
||||
return;
|
||||
}
|
||||
if(!this.timestamps.containsKey("stamTick")){
|
||||
this.timestamps.put("stamTick", System.currentTimeMillis());
|
||||
}else{
|
||||
if(this.containsEffect(441156479) || this.containsEffect(441156455)) {
|
||||
if(System.currentTimeMillis() - this.timestamps.get("stamTick") > 5000){
|
||||
boolean worked = false;
|
||||
while(!worked) {
|
||||
float old = this.stamina.get();
|
||||
float mod = old + 4;
|
||||
if (mod > this.staminaMax)
|
||||
mod = this.staminaMax;
|
||||
|
||||
worked = this.stamina.compareAndSet(old, mod);
|
||||
}
|
||||
this.timestamps.put("stamTick", System.currentTimeMillis());
|
||||
}
|
||||
}else{
|
||||
this.timestamps.put("stamTick", System.currentTimeMillis());
|
||||
}
|
||||
}
|
||||
//if(!this.timestamps.containsKey("stamTick")){
|
||||
// this.timestamps.put("stamTick", System.currentTimeMillis());
|
||||
//}else{
|
||||
// if(this.containsEffect(441156479) || this.containsEffect(441156455)) {
|
||||
// if(System.currentTimeMillis() - this.timestamps.get("stamTick") > 5000){
|
||||
// boolean worked = false;
|
||||
// while(!worked) {
|
||||
// float old = this.stamina.get();
|
||||
// float mod = old + 4;
|
||||
// if (mod > this.staminaMax)
|
||||
// mod = this.staminaMax;
|
||||
//
|
||||
// worked = this.stamina.compareAndSet(old, mod);
|
||||
// }
|
||||
// this.timestamps.put("stamTick", System.currentTimeMillis());
|
||||
// }
|
||||
// }else{
|
||||
// this.timestamps.put("stamTick", System.currentTimeMillis());
|
||||
// }
|
||||
//}
|
||||
|
||||
if (this.isAlive() && this.isActive && this.enteredWorld) {
|
||||
|
||||
@@ -5177,7 +5177,8 @@ public class PlayerCharacter extends AbstractCharacter {
|
||||
} else {
|
||||
this.combatStats.update();
|
||||
}
|
||||
this.doRegen();
|
||||
//this.doRegen();
|
||||
this.combatStats.regenerate();
|
||||
}
|
||||
|
||||
if (this.getStamina() < 10) {
|
||||
|
||||
Reference in New Issue
Block a user