summaryrefslogtreecommitdiffstats
path: root/src/Items/ItemHandler.cpp
diff options
context:
space:
mode:
authorarchshift <admin@archshift.com>2014-06-07 22:45:00 +0200
committerarchshift <admin@archshift.com>2014-06-17 20:39:19 +0200
commit1eb04a48ee3ec4114adc4334e6fbcc7561834025 (patch)
tree6107d38a80cf4f4584f0d3edb6610f67148fa8e2 /src/Items/ItemHandler.cpp
parentPawn.cpp: fixed effect iterator BAD_ACCESS (diff)
downloadcuberite-1eb04a48ee3ec4114adc4334e6fbcc7561834025.tar
cuberite-1eb04a48ee3ec4114adc4334e6fbcc7561834025.tar.gz
cuberite-1eb04a48ee3ec4114adc4334e6fbcc7561834025.tar.bz2
cuberite-1eb04a48ee3ec4114adc4334e6fbcc7561834025.tar.lz
cuberite-1eb04a48ee3ec4114adc4334e6fbcc7561834025.tar.xz
cuberite-1eb04a48ee3ec4114adc4334e6fbcc7561834025.tar.zst
cuberite-1eb04a48ee3ec4114adc4334e6fbcc7561834025.zip
Diffstat (limited to 'src/Items/ItemHandler.cpp')
-rw-r--r--src/Items/ItemHandler.cpp19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/Items/ItemHandler.cpp b/src/Items/ItemHandler.cpp
index 67740e860..83be87b9e 100644
--- a/src/Items/ItemHandler.cpp
+++ b/src/Items/ItemHandler.cpp
@@ -19,6 +19,7 @@
#include "ItemCloth.h"
#include "ItemComparator.h"
#include "ItemDoor.h"
+#include "ItemMilk.h"
#include "ItemDye.h"
#include "ItemEmptyMap.h"
#include "ItemFishingRod.h"
@@ -119,6 +120,7 @@ cItemHandler *cItemHandler::CreateItemHandler(int a_ItemType)
case E_ITEM_FLOWER_POT: return new cItemFlowerPotHandler(a_ItemType);
case E_BLOCK_LILY_PAD: return new cItemLilypadHandler(a_ItemType);
case E_ITEM_MAP: return new cItemMapHandler();
+ case E_ITEM_MILK: return new cItemMilkHandler();
case E_ITEM_ITEM_FRAME: return new cItemItemFrameHandler(a_ItemType);
case E_ITEM_NETHER_WART: return new cItemNetherWartHandler(a_ItemType);
case E_ITEM_PAINTING: return new cItemPaintingHandler(a_ItemType);
@@ -475,7 +477,6 @@ bool cItemHandler::IsFood(void)
case E_ITEM_BREAD:
case E_ITEM_RAW_PORKCHOP:
case E_ITEM_COOKED_PORKCHOP:
- case E_ITEM_MILK:
case E_ITEM_RAW_FISH:
case E_ITEM_COOKED_FISH:
case E_ITEM_COOKIE:
@@ -501,6 +502,22 @@ bool cItemHandler::IsFood(void)
+bool cItemHandler::IsDrinkable(void)
+{
+ switch (m_ItemType)
+ {
+ case E_ITEM_MILK:
+ {
+ return true;
+ }
+ } // switch (m_ItemType)
+ return false;
+}
+
+
+
+
+
bool cItemHandler::IsPlaceable(void)
{
// We can place any block that has a corresponding E_BLOCK_TYPE: