summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2013-09-14 08:16:39 +0200
committermadmaxoft <github@xoft.cz>2013-09-14 08:16:56 +0200
commit2973b179777e9a78b4aaf7c10e6b82d3af317fa4 (patch)
tree255ccc925dccc2c9e747f32acb4e1b683820dd5d
parentMerge pull request #165 from tonibm19/patch-2 (diff)
downloadcuberite-2973b179777e9a78b4aaf7c10e6b82d3af317fa4.tar
cuberite-2973b179777e9a78b4aaf7c10e6b82d3af317fa4.tar.gz
cuberite-2973b179777e9a78b4aaf7c10e6b82d3af317fa4.tar.bz2
cuberite-2973b179777e9a78b4aaf7c10e6b82d3af317fa4.tar.lz
cuberite-2973b179777e9a78b4aaf7c10e6b82d3af317fa4.tar.xz
cuberite-2973b179777e9a78b4aaf7c10e6b82d3af317fa4.tar.zst
cuberite-2973b179777e9a78b4aaf7c10e6b82d3af317fa4.zip
Diffstat (limited to '')
-rw-r--r--source/Items/ItemHandler.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/source/Items/ItemHandler.cpp b/source/Items/ItemHandler.cpp
index 374d0ebf5..08a7b661d 100644
--- a/source/Items/ItemHandler.cpp
+++ b/source/Items/ItemHandler.cpp
@@ -54,7 +54,11 @@ cItemHandler * cItemHandler::GetItemHandler(int a_ItemType)
{
if (a_ItemType < 0)
{
- ASSERT(!"Bad item type");
+ // Either nothing (-1), or bad value, both cases should return the air handler
+ if (a_ItemType < -1)
+ {
+ ASSERT(!"Bad item type");
+ }
a_ItemType = 0;
}
@@ -86,6 +90,7 @@ cItemHandler *cItemHandler::CreateItemHandler(int a_ItemType)
case E_BLOCK_SAPLING: return new cItemSaplingHandler(a_ItemType);
case E_BLOCK_WOOL: return new cItemClothHandler(a_ItemType);
case E_ITEM_BED: return new cItemBedHandler(a_ItemType);
+ case E_ITEM_BOAT: return new cItemBoatHandler(a_ItemType);
case E_ITEM_BOW: return new cItemBowHandler;
case E_ITEM_BREWING_STAND: return new cItemBrewingStandHandler(a_ItemType);
case E_ITEM_CAULDRON: return new cItemCauldronHandler(a_ItemType);
@@ -181,11 +186,6 @@ cItemHandler *cItemHandler::CreateItemHandler(int a_ItemType)
return new cItemMinecartHandler(a_ItemType);
}
- case E_ITEM_BOAT:
- {
- return new cItemBoatHandler(a_ItemType);
- }
-
// Food:
case E_ITEM_BREAD:
case E_ITEM_COOKIE: