summaryrefslogtreecommitdiffstats
path: root/source/Items/ItemHandler.cpp
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-10-18 11:36:30 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-10-18 11:36:30 +0200
commit84da8a2353a75f6f95ab375fac13b035bb14b71f (patch)
tree3c6e276f98db1356acd7651678944f15f8361072 /source/Items/ItemHandler.cpp
parentFixed a vulnerability in cClientHandle::HandleRespawn() (diff)
downloadcuberite-84da8a2353a75f6f95ab375fac13b035bb14b71f.tar
cuberite-84da8a2353a75f6f95ab375fac13b035bb14b71f.tar.gz
cuberite-84da8a2353a75f6f95ab375fac13b035bb14b71f.tar.bz2
cuberite-84da8a2353a75f6f95ab375fac13b035bb14b71f.tar.lz
cuberite-84da8a2353a75f6f95ab375fac13b035bb14b71f.tar.xz
cuberite-84da8a2353a75f6f95ab375fac13b035bb14b71f.tar.zst
cuberite-84da8a2353a75f6f95ab375fac13b035bb14b71f.zip
Diffstat (limited to 'source/Items/ItemHandler.cpp')
-rw-r--r--source/Items/ItemHandler.cpp20
1 files changed, 9 insertions, 11 deletions
diff --git a/source/Items/ItemHandler.cpp b/source/Items/ItemHandler.cpp
index 44177760a..af050eabd 100644
--- a/source/Items/ItemHandler.cpp
+++ b/source/Items/ItemHandler.cpp
@@ -27,6 +27,7 @@
#include "ItemFood.h"
#include "ItemSign.h"
#include "ItemBed.h"
+#include "ItemSpawnEgg.h"
#include "../Blocks/BlockHandler.h"
@@ -66,15 +67,18 @@ cItemHandler *cItemHandler::CreateItemHandler(int a_ItemID)
{
default: return new cItemHandler(a_ItemID);
- // Single item per handler:
- case E_ITEM_SHEARS: return new cItemShearsHandler(a_ItemID);
- case E_ITEM_LEAVES: return new cItemLeavesHandler(a_ItemID);
- case E_ITEM_SAPLING: return new cItemSaplingHandler(a_ItemID);
+ // Single item per handler, alphabetically sorted:
+ case E_ITEM_BED: return new cItemBedHandler(a_ItemID);
case E_ITEM_DYE: return new cItemDyeHandler(a_ItemID);
- case E_ITEM_SUGARCANE: return new cItemSugarcaneHandler(a_ItemID);
case E_ITEM_FLINT_AND_STEEL: return new cItemLighterHandler(a_ItemID);
+ case E_ITEM_LEAVES: return new cItemLeavesHandler(a_ItemID);
case E_ITEM_REDSTONE_DUST: return new cItemRedstoneDustHandler(a_ItemID);
case E_ITEM_REDSTONE_REPEATER: return new cItemRedstoneRepeaterHandler(a_ItemID);
+ case E_ITEM_SAPLING: return new cItemSaplingHandler(a_ItemID);
+ case E_ITEM_SHEARS: return new cItemShearsHandler(a_ItemID);
+ case E_ITEM_SIGN: return new cItemSignHandler(a_ItemID);
+ case E_ITEM_SPAWN_EGG: return new cItemSpawnEggHandler(a_ItemID);
+ case E_ITEM_SUGARCANE: return new cItemSugarcaneHandler(a_ItemID);
case E_ITEM_WOOL: return new cItemClothHandler(a_ItemID);
case E_ITEM_WOODEN_HOE:
@@ -164,12 +168,6 @@ cItemHandler *cItemHandler::CreateItemHandler(int a_ItemID)
{
return new cItemFoodHandler(a_ItemID);
}
-
- case E_ITEM_SIGN:
- return new cItemSignHandler(a_ItemID);
-
- case E_ITEM_BED:
- return new cItemBedHandler(a_ItemID);
}
}