Skip to content

Commit

Permalink
player/player.go: Fixed food regeneration.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sandertv committed Dec 23, 2024
1 parent c507072 commit d2fc86e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions server/player/player.go
Original file line number Diff line number Diff line change
Expand Up @@ -2391,12 +2391,12 @@ func (p *Player) tickFood() {
p.AddFood(1)
}
if p.hunger.foodTick%20 == 0 {
p.regenerate(false)
p.regenerate(true)
}
}
if p.hunger.foodTick == 0 {
if p.hunger.foodTick == 1 {
if p.hunger.canRegenerate() {
p.regenerate(true)
p.regenerate(false)
} else if p.hunger.starving() {
p.starve()
}
Expand Down

0 comments on commit d2fc86e

Please sign in to comment.