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/ItemSapling.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 'source/items/ItemSapling.h')
-rw-r--r-- | source/items/ItemSapling.h | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/source/items/ItemSapling.h b/source/items/ItemSapling.h index 23894b812..7edbc76c9 100644 --- a/source/items/ItemSapling.h +++ b/source/items/ItemSapling.h @@ -1,8 +1,12 @@ +
#pragma once
#include "Item.h"
+
+
+
class cItemSaplingHandler : public cItemHandler
{
public:
@@ -12,9 +16,13 @@ public: }
- virtual NIBBLETYPE GetBlockMeta(NIBBLETYPE a_ItemMeta) override
+ virtual NIBBLETYPE GetBlockMeta(short a_ItemDamage) override
{
- //Only the first 2 bits are important
- return a_ItemMeta & 3;
+ // Only the lowest 3 bits are important
+ return (NIBBLETYPE)(a_ItemDamage & 0x07);
}
-};
\ No newline at end of file +} ;
+
+
+
+
|