From 3eff1473553bf54acd1cff839ece0f1a91a372f1 Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Mon, 16 Jul 2012 18:29:33 +0000 Subject: Changed GetBlockMeta to return NIBBLETYPE instead of char git-svn-id: http://mc-server.googlecode.com/svn/trunk@675 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/items/Item.cpp | 2 +- source/items/Item.h | 2 +- source/items/ItemCloth.h | 2 +- source/items/ItemLeaves.h | 4 ++-- source/items/ItemRedstoneDust.h | 2 +- source/items/ItemRedstoneRepeater.h | 2 +- source/items/ItemSapling.h | 2 +- source/items/ItemSeeds.h | 2 +- source/items/ItemSlab.h | 2 +- source/items/ItemSugarcane.h | 2 +- source/items/ItemWood.h | 2 +- 11 files changed, 12 insertions(+), 12 deletions(-) (limited to 'source/items') diff --git a/source/items/Item.cpp b/source/items/Item.cpp index 5c978e8ed..e6129bbd2 100644 --- a/source/items/Item.cpp +++ b/source/items/Item.cpp @@ -212,7 +212,7 @@ BLOCKTYPE cItemHandler::GetBlockType() return m_ItemID; } -char cItemHandler::GetBlockMeta(char a_ItemMeta) +NIBBLETYPE cItemHandler::GetBlockMeta(char a_ItemMeta) { return a_ItemMeta; //This keeps most textures. The few other items have to override this } diff --git a/source/items/Item.h b/source/items/Item.h index e63ec2fc4..f0dcfd415 100644 --- a/source/items/Item.h +++ b/source/items/Item.h @@ -24,7 +24,7 @@ public: virtual bool IsPlaceable(); virtual BLOCKTYPE GetBlockType(); - virtual char GetBlockMeta(char a_ItemMeta); + virtual NIBBLETYPE GetBlockMeta(char a_ItemMeta) override; virtual bool CanHarvestBlock(BLOCKTYPE a_BlockID); diff --git a/source/items/ItemCloth.h b/source/items/ItemCloth.h index 805e90cb4..e3ab0c74b 100644 --- a/source/items/ItemCloth.h +++ b/source/items/ItemCloth.h @@ -11,7 +11,7 @@ public: { } - virtual char GetBlockMeta(char a_ItemMeta) + virtual NIBBLETYPE GetBlockMeta(char a_ItemMeta) override { return a_ItemMeta; } diff --git a/source/items/ItemLeaves.h b/source/items/ItemLeaves.h index d328858fd..03f0ce8f3 100644 --- a/source/items/ItemLeaves.h +++ b/source/items/ItemLeaves.h @@ -10,8 +10,8 @@ public: : cItemHandler(a_ItemID) { } - virtual char GetBlockMeta(char a_ItemMeta) + virtual NIBBLETYPE GetBlockMeta(char a_ItemMeta) override { - return a_ItemMeta | 0x4; //0x4 bit set means this is a player places leave + return a_ItemMeta | 0x4; //0x4 bit set means this is a player-placed leaves block, not to be decayed } }; \ No newline at end of file diff --git a/source/items/ItemRedstoneDust.h b/source/items/ItemRedstoneDust.h index 99529a4e8..ccae0fd13 100644 --- a/source/items/ItemRedstoneDust.h +++ b/source/items/ItemRedstoneDust.h @@ -20,7 +20,7 @@ public: return E_BLOCK_REDSTONE_WIRE; } - virtual char GetBlockMeta(char a_ItemMeta) + virtual NIBBLETYPE GetBlockMeta(char a_ItemMeta) override { return 0; } diff --git a/source/items/ItemRedstoneRepeater.h b/source/items/ItemRedstoneRepeater.h index 0250cdee0..57f6eeb77 100644 --- a/source/items/ItemRedstoneRepeater.h +++ b/source/items/ItemRedstoneRepeater.h @@ -20,7 +20,7 @@ public: return ::E_BLOCK_REDSTONE_REPEATER_OFF; } - virtual char GetBlockMeta(char a_ItemMeta) + virtual NIBBLETYPE GetBlockMeta(char a_ItemMeta) override { return 0; } diff --git a/source/items/ItemSapling.h b/source/items/ItemSapling.h index 29c14abee..35a201f81 100644 --- a/source/items/ItemSapling.h +++ b/source/items/ItemSapling.h @@ -12,7 +12,7 @@ public: } - virtual char GetBlockMeta(char a_ItemMeta) + virtual NIBBLETYPE GetBlockMeta(char a_ItemMeta) override { //Only the first 2 bits are important return a_ItemMeta & 3; diff --git a/source/items/ItemSeeds.h b/source/items/ItemSeeds.h index d5f9244b2..bf0c38789 100644 --- a/source/items/ItemSeeds.h +++ b/source/items/ItemSeeds.h @@ -37,7 +37,7 @@ public: } } - virtual char GetBlockMeta(char a_ItemMeta) + virtual NIBBLETYPE GetBlockMeta(char a_ItemMeta) override { return 0; //Not grown yet } diff --git a/source/items/ItemSlab.h b/source/items/ItemSlab.h index 3cb4afeb0..54186d704 100644 --- a/source/items/ItemSlab.h +++ b/source/items/ItemSlab.h @@ -32,7 +32,7 @@ public: return false; } - virtual char GetBlockMeta(char a_ItemMeta) + virtual NIBBLETYPE GetBlockMeta(char a_ItemMeta) override { return a_ItemMeta; } diff --git a/source/items/ItemSugarcane.h b/source/items/ItemSugarcane.h index 515f94014..b79a3c6c7 100644 --- a/source/items/ItemSugarcane.h +++ b/source/items/ItemSugarcane.h @@ -27,7 +27,7 @@ public: return E_BLOCK_SUGARCANE; } - virtual char GetBlockMeta(char a_ItemMeta) + virtual NIBBLETYPE GetBlockMeta(char a_ItemMeta) override { return 0; //Not grown yet } diff --git a/source/items/ItemWood.h b/source/items/ItemWood.h index 91eaa7675..3254b70ed 100644 --- a/source/items/ItemWood.h +++ b/source/items/ItemWood.h @@ -10,7 +10,7 @@ public: : cItemHandler(a_ItemID) { } - virtual char GetBlockMeta(char a_ItemMeta) + virtual NIBBLETYPE GetBlockMeta(char a_ItemMeta) override { return a_ItemMeta; } -- cgit v1.2.3