1
0

Changed GetBlockMeta to return NIBBLETYPE instead of char

git-svn-id: http://mc-server.googlecode.com/svn/trunk@675 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
madmaxoft@gmail.com 2012-07-16 18:29:33 +00:00
parent ee4a6df36b
commit 3eff147355
11 changed files with 12 additions and 12 deletions

View File

@ -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
}

View File

@ -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);

View File

@ -11,7 +11,7 @@ public:
{
}
virtual char GetBlockMeta(char a_ItemMeta)
virtual NIBBLETYPE GetBlockMeta(char a_ItemMeta) override
{
return a_ItemMeta;
}

View File

@ -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
}
};

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;

View File

@ -37,7 +37,7 @@ public:
}
}
virtual char GetBlockMeta(char a_ItemMeta)
virtual NIBBLETYPE GetBlockMeta(char a_ItemMeta) override
{
return 0; //Not grown yet
}

View File

@ -32,7 +32,7 @@ public:
return false;
}
virtual char GetBlockMeta(char a_ItemMeta)
virtual NIBBLETYPE GetBlockMeta(char a_ItemMeta) override
{
return a_ItemMeta;
}

View File

@ -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
}

View File

@ -10,7 +10,7 @@ public:
: cItemHandler(a_ItemID)
{
}
virtual char GetBlockMeta(char a_ItemMeta)
virtual NIBBLETYPE GetBlockMeta(char a_ItemMeta) override
{
return a_ItemMeta;
}