From c68aa68c699a618d0172bceacf553ab96fc32cdd Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Thu, 18 Oct 2012 19:41:29 +0000 Subject: Fixed a few bugs in fluid placement - fluid into other fluid, fluid into washable blocks. git-svn-id: http://mc-server.googlecode.com/svn/trunk@977 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/Items/ItemHandler.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'source/Items/ItemHandler.h') 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); } -- cgit v1.2.3