diff options
Diffstat (limited to 'source/items/ItemLeaves.h')
-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 +} ;
+
+
+
+
|