summaryrefslogtreecommitdiffstats
path: root/src/Items/ItemSeeds.h
diff options
context:
space:
mode:
authordaniel0916 <theschokolps@gmail.com>2014-04-07 20:12:17 +0200
committerdaniel0916 <theschokolps@gmail.com>2014-04-07 20:12:17 +0200
commit2e9754ac1cf0537c12ab7974cf55c451c0724540 (patch)
tree713c5b8c8f22f77893b30b9c8cefca4a7c491483 /src/Items/ItemSeeds.h
parentFixed merge conflict (diff)
parentFixed some more minor issues with the redstone simulator. (diff)
downloadcuberite-2e9754ac1cf0537c12ab7974cf55c451c0724540.tar
cuberite-2e9754ac1cf0537c12ab7974cf55c451c0724540.tar.gz
cuberite-2e9754ac1cf0537c12ab7974cf55c451c0724540.tar.bz2
cuberite-2e9754ac1cf0537c12ab7974cf55c451c0724540.tar.lz
cuberite-2e9754ac1cf0537c12ab7974cf55c451c0724540.tar.xz
cuberite-2e9754ac1cf0537c12ab7974cf55c451c0724540.tar.zst
cuberite-2e9754ac1cf0537c12ab7974cf55c451c0724540.zip
Diffstat (limited to 'src/Items/ItemSeeds.h')
-rw-r--r--src/Items/ItemSeeds.h22
1 files changed, 21 insertions, 1 deletions
diff --git a/src/Items/ItemSeeds.h b/src/Items/ItemSeeds.h
index 67f0d38bd..7283edcee 100644
--- a/src/Items/ItemSeeds.h
+++ b/src/Items/ItemSeeds.h
@@ -22,10 +22,30 @@ 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,
- int a_BlockX, int a_BlockY, int a_BlockZ, char a_BlockFace,
+ int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_BlockFace,
int a_CursorX, int a_CursorY, int a_CursorZ,
BLOCKTYPE & a_BlockType, NIBBLETYPE & a_BlockMeta
) override