mirror of
https://github.com/smartcmd/MinecraftConsoles.git
synced 2026-08-20 09:57:09 +00:00
Changed criteria
Just realized you need full hunger for quick regen (oops)
This commit is contained in:
parent
883f622415
commit
5b16ced306
|
|
@ -1004,15 +1004,12 @@ void Player::aiStep()
|
|||
if (level->getGameRules()->getBoolean(GameRules::RULE_NATURAL_REGENERATION)) {
|
||||
bool health_OK = getHealth() < getMaxHealth();
|
||||
if ((tickCount % 12 == 0) && health_OK) {
|
||||
|
||||
|
||||
|
||||
FoodData* fd = getFoodData();
|
||||
if ((level->difficulty == Difficulty::PEACEFUL)) {
|
||||
heal(1);
|
||||
}
|
||||
//Quick-Regen from saturation (must have 8 1/2 hunger and have at least 3 saturation)
|
||||
else if (fd->getSaturationLevel() > 3 && fd->getFoodLevel() >= 17) {
|
||||
//Quick-Regen from saturation (must have full hunger and have at least 3 saturation)
|
||||
else if (fd->getSaturationLevel() > 3 && fd->getFoodLevel() == 20) {
|
||||
heal(1);
|
||||
fd->setSaturation(fd->getSaturationLevel() - 3);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue