diff options
Diffstat (limited to 'source/Items/ItemHandler.cpp')
-rw-r--r-- | source/Items/ItemHandler.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/source/Items/ItemHandler.cpp b/source/Items/ItemHandler.cpp index 2ae193d52..08a7b661d 100644 --- a/source/Items/ItemHandler.cpp +++ b/source/Items/ItemHandler.cpp @@ -8,6 +8,7 @@ // Handlers: #include "ItemBed.h" +#include "ItemBoat.h" #include "ItemBow.h" #include "ItemBrewingStand.h" #include "ItemBucket.h" @@ -53,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; } @@ -85,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); |