summaryrefslogtreecommitdiffstats
path: root/source/Items/ItemHandler.h
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-10-18 21:41:29 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-10-18 21:41:29 +0200
commitc68aa68c699a618d0172bceacf553ab96fc32cdd (patch)
treea2eb1d2e76ea183f2c0aee66accd98beeba48e0d /source/Items/ItemHandler.h
parentFixed item damage value not being read from the 1.3.2 protocol (wtf, why was it disabled?) (diff)
downloadcuberite-c68aa68c699a618d0172bceacf553ab96fc32cdd.tar
cuberite-c68aa68c699a618d0172bceacf553ab96fc32cdd.tar.gz
cuberite-c68aa68c699a618d0172bceacf553ab96fc32cdd.tar.bz2
cuberite-c68aa68c699a618d0172bceacf553ab96fc32cdd.tar.lz
cuberite-c68aa68c699a618d0172bceacf553ab96fc32cdd.tar.xz
cuberite-c68aa68c699a618d0172bceacf553ab96fc32cdd.tar.zst
cuberite-c68aa68c699a618d0172bceacf553ab96fc32cdd.zip
Diffstat (limited to 'source/Items/ItemHandler.h')
-rw-r--r--source/Items/ItemHandler.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/source/Items/ItemHandler.h b/source/Items/ItemHandler.h
index 23aa0448d..dfd5739af 100644
--- a/source/Items/ItemHandler.h
+++ b/source/Items/ItemHandler.h
@@ -17,9 +17,9 @@ class cPlayer;
class cItemHandler
{
public:
- cItemHandler(int a_ItemID);
+ cItemHandler(int a_ItemType);
// Called when the player tries to use the item. Return false to make the item unusable. DEFAULT: False
- virtual bool OnItemUse(cWorld *a_World, cPlayer *a_Player, cItem *a_Item, int a_X, int a_Y, int a_Z, char a_Dir); //eg for fishing or hoes
+ virtual bool OnItemUse(cWorld *a_World, cPlayer *a_Player, cItem *a_Item, int a_BlockX, int a_BlockY, int a_BlockZ, char a_Dir); //eg for fishing or hoes
// Called while the player diggs a block using this item
virtual bool OnDiggingBlock(cWorld * a_World, cPlayer * a_Player, cItem * a_HeldItem, int a_BlockX, int a_BlockY, int a_BlockZ, char a_BlockFace);
// Called when the player destroys a block using this item. This also calls the drop function for the destroyed block
@@ -50,7 +50,7 @@ public:
virtual bool EatItem(cPlayer *a_Player, cItem *a_Item);
// Places the current block and removes the item from the player inventory
- virtual void PlaceBlock(cWorld *a_World, cPlayer *a_Player, cItem *a_Item, int a_X, int a_Y, int a_Z, char a_Dir);
+ virtual void PlaceBlock(cWorld *a_World, cPlayer *a_Player, cItem *a_Item, int a_BlockX, int a_BlockY, int a_BlockZ, char a_Dir);
// Indicates if this item is a tool
virtual bool IsTool();
@@ -66,18 +66,18 @@ public:
// Returns whether this tool/item can harvest a specific block (e.g. wooden pickaxe can harvest stone, but wood canīt) DEFAULT: False
virtual bool CanHarvestBlock(BLOCKTYPE a_BlockType);
- static cItemHandler *GetItemHandler(int a_ItemID);
+ static cItemHandler *GetItemHandler(int a_ItemType);
static void Deinit();
protected:
- int m_ItemID;
- static cItemHandler *CreateItemHandler(int m_ItemID);
+ int m_ItemType;
+ static cItemHandler *CreateItemHandler(int m_ItemType);
static cItemHandler *m_ItemHandler[2266];
static bool m_HandlerInitialized; //used to detect if the itemhandlers are initialized
};
//Short function
-inline cItemHandler *ItemHandler(int a_ItemID) { return cItemHandler::GetItemHandler(a_ItemID); } \ No newline at end of file
+inline cItemHandler *ItemHandler(int a_ItemType) { return cItemHandler::GetItemHandler(a_ItemType); }