summaryrefslogtreecommitdiffstats
path: root/src/Items/ItemHandler.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-02-03 22:16:26 +0100
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-02-03 22:16:26 +0100
commit3fc848c95a7e16ac759dc74f32ea7e7b0f46de6e (patch)
treeb50b3217a96456c5c798b4562e12f34dcdf806a8 /src/Items/ItemHandler.cpp
parentFixed issues with farmland (diff)
downloadcuberite-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/ItemHandler.cpp')
-rw-r--r--src/Items/ItemHandler.cpp25
1 files changed, 15 insertions, 10 deletions
diff --git a/src/Items/ItemHandler.cpp b/src/Items/ItemHandler.cpp
index 302796d1b..9024aafea 100644
--- a/src/Items/ItemHandler.cpp
+++ b/src/Items/ItemHandler.cpp
@@ -181,23 +181,28 @@ cItemHandler *cItemHandler::CreateItemHandler(int a_ItemType)
return new cItemMinecartHandler(a_ItemType);
}
- // Food:
+ // Food (please keep alpha-sorted):
+ // (carrots and potatoes handled in SeedHandler as both seed and food
+ case E_ITEM_BAKED_POTATO:
case E_ITEM_BREAD:
+ case E_ITEM_COOKED_CHICKEN:
+ case E_ITEM_COOKED_FISH:
+ case E_ITEM_COOKED_PORKCHOP:
case E_ITEM_COOKIE:
+ case E_ITEM_GOLDEN_APPLE:
+ case E_ITEM_GOLDEN_CARROT:
case E_ITEM_MELON_SLICE:
- case E_ITEM_RAW_CHICKEN:
- case E_ITEM_COOKED_CHICKEN:
+ case E_ITEM_MUSHROOM_SOUP:
+ case E_ITEM_POISONOUS_POTATO:
+ case E_ITEM_PUMPKIN_PIE:
case E_ITEM_RAW_BEEF:
- case E_ITEM_RAW_PORKCHOP:
- case E_ITEM_STEAK:
- case E_ITEM_COOKED_PORKCHOP:
+ case E_ITEM_RAW_CHICKEN:
case E_ITEM_RAW_FISH:
- case E_ITEM_COOKED_FISH:
+ case E_ITEM_RAW_PORKCHOP:
case E_ITEM_RED_APPLE:
- case E_ITEM_GOLDEN_APPLE:
case E_ITEM_ROTTEN_FLESH:
- case E_ITEM_MUSHROOM_SOUP:
case E_ITEM_SPIDER_EYE:
+ case E_ITEM_STEAK:
{
return new cItemFoodHandler(a_ItemType);
}
@@ -511,7 +516,7 @@ bool cItemHandler::EatItem(cPlayer * a_Player, cItem * a_Item)
cItemHandler::FoodInfo cItemHandler::GetFoodInfo()
{
- return FoodInfo(0, 0.f);
+ return FoodInfo(0, 0);
}