the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
at master 34 lines 701 B view raw
1#pragma once 2 3class FoodItem; 4class Player; 5class CompoundTag; 6 7class FoodData 8{ 9private: 10 int foodLevel; 11 float saturationLevel; 12 float exhaustionLevel; 13 14 int tickTimer; 15 int lastFoodLevel; 16 17public: 18 FoodData(); 19 20 void eat(int food, float saturationModifier); 21 void eat(FoodItem *item); 22 void tick(shared_ptr<Player> player); 23 void readAdditionalSaveData(CompoundTag *entityTag); 24 void addAdditonalSaveData(CompoundTag *entityTag); 25 int getFoodLevel(); 26 int getLastFoodLevel(); 27 bool needsFood(); 28 void addExhaustion(float amount); 29 float getExhaustionLevel(); 30 float getSaturationLevel(); 31 void setFoodLevel(int food); 32 void setSaturation(float saturation); 33 void setExhaustion(float exhaustion); 34};