diff options
author | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2014-02-03 22:16:26 +0100 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2014-02-03 22:16:26 +0100 |
commit | 3fc848c95a7e16ac759dc74f32ea7e7b0f46de6e (patch) | |
tree | b50b3217a96456c5c798b4562e12f34dcdf806a8 /src/Items/ItemSeeds.h | |
parent | Fixed issues with farmland (diff) | |
download | cuberite-3fc848c95a7e16ac759dc74f32ea7e7b0f46de6e.tar cuberite-3fc848c95a7e16ac759dc74f32ea7e7b0f46de6e.tar.gz cuberite-3fc848c95a7e16ac759dc74f32ea7e7b0f46de6e.tar.bz2 cuberite-3fc848c95a7e16ac759dc74f32ea7e7b0f46de6e.tar.lz cuberite-3fc848c95a7e16ac759dc74f32ea7e7b0f46de6e.tar.xz cuberite-3fc848c95a7e16ac759dc74f32ea7e7b0f46de6e.tar.zst cuberite-3fc848c95a7e16ac759dc74f32ea7e7b0f46de6e.zip |
Diffstat (limited to 'src/Items/ItemSeeds.h')
-rw-r--r-- | src/Items/ItemSeeds.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/Items/ItemSeeds.h b/src/Items/ItemSeeds.h index 67f0d38bd..3e20e2d56 100644 --- a/src/Items/ItemSeeds.h +++ b/src/Items/ItemSeeds.h @@ -22,6 +22,26 @@ public: { return true; } + + virtual bool IsFood(void) override + { + switch (m_ItemType) // Special cases, both a seed and food + { + case E_ITEM_CARROT: + case E_ITEM_POTATO: return true; + default: return false; + } + } + + virtual FoodInfo GetFoodInfo(void) override + { + switch (m_ItemType) + { + case E_ITEM_CARROT: return FoodInfo(4, 4.8); + case E_ITEM_POTATO: return FoodInfo(1, 0.6); + default: return FoodInfo(0, 0); + } + } virtual bool GetPlacementBlockTypeMeta( cWorld * a_World, cPlayer * a_Player, |