Update exhaustion values for 1.18.30 (#5034)

This commit is contained in:
Duo Incure
2022-05-17 18:28:19 +01:00
committed by GitHub
parent 1e59679ec2
commit 89cc449808
4 changed files with 10 additions and 10 deletions

View File

@ -156,9 +156,9 @@ class Human extends Living implements ProjectileSource, InventoryHolder{
public function jump() : void{
parent::jump();
if($this->isSprinting()){
$this->hungerManager->exhaust(0.8, PlayerExhaustEvent::CAUSE_SPRINT_JUMPING);
$this->hungerManager->exhaust(0.2, PlayerExhaustEvent::CAUSE_SPRINT_JUMPING);
}else{
$this->hungerManager->exhaust(0.2, PlayerExhaustEvent::CAUSE_JUMPING);
$this->hungerManager->exhaust(0.05, PlayerExhaustEvent::CAUSE_JUMPING);
}
}

View File

@ -208,7 +208,7 @@ class HungerManager{
if($food >= 18){
if($health < $this->entity->getMaxHealth()){
$this->entity->heal(new EntityRegainHealthEvent($this->entity, 1, EntityRegainHealthEvent::CAUSE_SATURATION));
$this->exhaust(3.0, PlayerExhaustEvent::CAUSE_HEALTH_REGEN);
$this->exhaust(6.0, PlayerExhaustEvent::CAUSE_HEALTH_REGEN);
}
}elseif($food <= 0){
if(($difficulty === World::DIFFICULTY_EASY && $health > 10) || ($difficulty === World::DIFFICULTY_NORMAL && $health > 1) || $difficulty === World::DIFFICULTY_HARD){

View File

@ -36,7 +36,7 @@ class HungerEffect extends Effect{
public function applyEffect(Living $entity, EffectInstance $instance, float $potency = 1.0, ?Entity $source = null) : void{
if($entity instanceof Human){
$entity->getHungerManager()->exhaust(0.025 * $instance->getEffectLevel(), PlayerExhaustEvent::CAUSE_POTION);
$entity->getHungerManager()->exhaust(0.1 * $instance->getEffectLevel(), PlayerExhaustEvent::CAUSE_POTION);
}
}
}