blob: 3416a44a8743325e718653f0599c45cd8fa00d14 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
#pragma once
class FoodItem;
class Player;
class CompoundTag;
class FoodData
{
private:
int foodLevel;
float saturationLevel;
float exhaustionLevel;
int tickTimer;
int lastFoodLevel;
public:
FoodData();
void eat(int food, float saturationModifier);
void eat(FoodItem *item);
void tick(shared_ptr<Player> player);
void readAdditionalSaveData(CompoundTag *entityTag);
void addAdditonalSaveData(CompoundTag *entityTag);
int getFoodLevel();
int getLastFoodLevel();
bool needsFood();
void addExhaustion(float amount);
float getExhaustionLevel();
float getSaturationLevel();
void setFoodLevel(int food);
void setSaturation(float saturation);
void setExhaustion(float exhaustion);
};
|