From 9dc0e3c2335fa6aacd0974b161bd96772639bf52 Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Sun, 29 Jul 2012 12:07:22 +0000 Subject: Fixed warnings in item handlers - items' damage value is a short, but block meta is only a NIBBLETYPE. Also slight cleanup. git-svn-id: http://mc-server.googlecode.com/svn/trunk@704 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/items/ItemSeeds.h | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) (limited to 'source/items/ItemSeeds.h') diff --git a/source/items/ItemSeeds.h b/source/items/ItemSeeds.h index 1d7f93613..07cf0e5de 100644 --- a/source/items/ItemSeeds.h +++ b/source/items/ItemSeeds.h @@ -1,9 +1,15 @@ + #pragma once #include "Item.h" #include "../cWorld.h" -class cItemSeedsHandler : public cItemHandler + + + + +class cItemSeedsHandler : + public cItemHandler { public: cItemSeedsHandler(int a_ItemID) @@ -21,18 +27,14 @@ public: { switch(m_ItemID) { - case E_ITEM_SEEDS: - return E_BLOCK_CROPS; - case E_ITEM_MELON_SEEDS: - E_BLOCK_MELON_STEM; - case E_ITEM_PUMPKIN_SEEDS: - E_BLOCK_PUMPKIN_STEM; - default: - return E_BLOCK_AIR; + case E_ITEM_SEEDS: return E_BLOCK_CROPS; + case E_ITEM_MELON_SEEDS: return E_BLOCK_MELON_STEM; + case E_ITEM_PUMPKIN_SEEDS: return E_BLOCK_PUMPKIN_STEM; + default: return E_BLOCK_AIR; } } - virtual NIBBLETYPE GetBlockMeta(NIBBLETYPE a_ItemMeta) override + virtual NIBBLETYPE GetBlockMeta(short a_ItemDamage) override { return 0; //Not grown yet } @@ -50,4 +52,8 @@ public: return cItemHandler::PlaceBlock(a_World, a_Player, a_Item, a_X, a_Y, a_Z, a_Dir); } -}; \ No newline at end of file +} ; + + + + -- cgit v1.2.3