diff options
author | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-07-29 14:07:22 +0200 |
---|---|---|
committer | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-07-29 14:07:22 +0200 |
commit | 9dc0e3c2335fa6aacd0974b161bd96772639bf52 (patch) | |
tree | 28381c0f45393be618e31c8475a049520128cb71 /source/items/ItemLeaves.h | |
parent | Fixed warnings in md5 (diff) | |
download | cuberite-9dc0e3c2335fa6aacd0974b161bd96772639bf52.tar cuberite-9dc0e3c2335fa6aacd0974b161bd96772639bf52.tar.gz cuberite-9dc0e3c2335fa6aacd0974b161bd96772639bf52.tar.bz2 cuberite-9dc0e3c2335fa6aacd0974b161bd96772639bf52.tar.lz cuberite-9dc0e3c2335fa6aacd0974b161bd96772639bf52.tar.xz cuberite-9dc0e3c2335fa6aacd0974b161bd96772639bf52.tar.zst cuberite-9dc0e3c2335fa6aacd0974b161bd96772639bf52.zip |
Diffstat (limited to '')
-rw-r--r-- | source/items/ItemLeaves.h | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/source/items/ItemLeaves.h b/source/items/ItemLeaves.h index bc1519806..01b090a2f 100644 --- a/source/items/ItemLeaves.h +++ b/source/items/ItemLeaves.h @@ -1,17 +1,27 @@ +
#pragma once
#include "Item.h"
-class cItemLeavesHandler : public cItemHandler
+
+
+
+class cItemLeavesHandler :
+ public cItemHandler
{
public:
cItemLeavesHandler(int a_ItemID)
: cItemHandler(a_ItemID)
{
}
- virtual NIBBLETYPE GetBlockMeta(NIBBLETYPE a_ItemMeta) override
+
+ virtual NIBBLETYPE GetBlockMeta(short a_ItemDamage) override
{
- return a_ItemMeta | 0x4; //0x4 bit set means this is a player places leave
+ return (NIBBLETYPE)(a_ItemDamage & 0x0f) | 0x4; //0x4 bit set means this is a player-placed leaves block, not to be decayed
}
-};
\ No newline at end of file +} ;
+
+
+
+
|