@ -5871,10 +5871,12 @@ public class PlayerCharacter extends AbstractCharacter {
@@ -5871,10 +5871,12 @@ public class PlayerCharacter extends AbstractCharacter {
this.resetRegenUpdateTime();
return;
}
regenerateHealth();
regenerateMana();
regenerateStamina();
consumeStamina();
this.updateMovementState();
this.regenerateHealth();
this.regenerateMana();
this.regenerateStamina();
this.consumeStamina();
this.syncClient();
}catch(Exceptione){
Logger.error(e);
}finally{
@ -5944,17 +5946,26 @@ public class PlayerCharacter extends AbstractCharacter {
@@ -5944,17 +5946,26 @@ public class PlayerCharacter extends AbstractCharacter {
floatstaminaRegenerated=secondsPassed/rate;// Stamina regenerates 1 point per `rate` seconds
floatratio=secondsPassed/secondsToRecover1;
//rate *= this.getRegenModifier(ModType.StaminaRecoverRate); // Adjust rate with modifiers
//float staminaRegenerated = secondsPassed / rate; // Stamina regenerates 1 point per `rate` seconds
floatstaminaRegenerated=secondsPassed*ratio;// Stamina regenerates 1 point per `rate` seconds
booleanworkedStamina=false;
floatold,mod;
@ -5967,7 +5978,7 @@ public class PlayerCharacter extends AbstractCharacter {
@@ -5967,7 +5978,7 @@ public class PlayerCharacter extends AbstractCharacter {
@ -5977,7 +5988,8 @@ public class PlayerCharacter extends AbstractCharacter {
@@ -5977,7 +5988,8 @@ public class PlayerCharacter extends AbstractCharacter {
@ -5986,8 +5998,10 @@ public class PlayerCharacter extends AbstractCharacter {
@@ -5986,8 +5998,10 @@ public class PlayerCharacter extends AbstractCharacter {
}else{
consumption=0.65f*secondsPassed;
}
if(!this.canBreathe||this.isFlying())
consumption*=2;
if(this.canBreathe)
consumption=1.5f*secondsPassed;
elseif(this.isFlying())
consumption=2.0f*secondsPassed;
booleanworkedStamina=false;
floatold,mod;
@ -5998,7 +6012,7 @@ public class PlayerCharacter extends AbstractCharacter {
@@ -5998,7 +6012,7 @@ public class PlayerCharacter extends AbstractCharacter {