summaryrefslogtreecommitdiffstats
path: root/src/Items/ItemMobHead.h
diff options
context:
space:
mode:
authorHowaner <franzi.moos@googlemail.com>2014-02-19 14:45:09 +0100
committerTheJumper <maximilian.springer@web.de>2014-02-23 19:50:50 +0100
commit1f726b7d9dade75d8f7a3e105f3c9689a1ef0e0b (patch)
tree617bf18a768a493c2cd428297168f57df0901c26 /src/Items/ItemMobHead.h
parentAdd break to Protocol17x.cpp and use new comment delimiter (diff)
downloadcuberite-1f726b7d9dade75d8f7a3e105f3c9689a1ef0e0b.tar
cuberite-1f726b7d9dade75d8f7a3e105f3c9689a1ef0e0b.tar.gz
cuberite-1f726b7d9dade75d8f7a3e105f3c9689a1ef0e0b.tar.bz2
cuberite-1f726b7d9dade75d8f7a3e105f3c9689a1ef0e0b.tar.lz
cuberite-1f726b7d9dade75d8f7a3e105f3c9689a1ef0e0b.tar.xz
cuberite-1f726b7d9dade75d8f7a3e105f3c9689a1ef0e0b.tar.zst
cuberite-1f726b7d9dade75d8f7a3e105f3c9689a1ef0e0b.zip
Diffstat (limited to 'src/Items/ItemMobHead.h')
-rw-r--r--src/Items/ItemMobHead.h42
1 files changed, 42 insertions, 0 deletions
diff --git a/src/Items/ItemMobHead.h b/src/Items/ItemMobHead.h
new file mode 100644
index 000000000..5ae040282
--- /dev/null
+++ b/src/Items/ItemMobHead.h
@@ -0,0 +1,42 @@
+
+#pragma once
+
+#include "ItemHandler.h"
+#include "../World.h"
+
+
+
+
+
+class cItemMobHeadHandler :
+ public cItemHandler
+{
+public:
+ cItemMobHeadHandler(int a_ItemType) :
+ cItemHandler(a_ItemType)
+ {
+ }
+
+
+ virtual bool IsPlaceable(void) override
+ {
+ return true;
+ }
+
+
+ virtual bool GetPlacementBlockTypeMeta(
+ cWorld * a_World, cPlayer * a_Player,
+ int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_BlockFace,
+ int a_CursorX, int a_CursorY, int a_CursorZ,
+ BLOCKTYPE & a_BlockType, NIBBLETYPE & a_BlockMeta
+ ) override
+ {
+ a_BlockType = E_BLOCK_HEAD;
+ a_BlockMeta = (NIBBLETYPE)(a_Player->GetEquippedItem().m_ItemDamage & 0x0f);
+ return true;
+ }
+} ;
+
+
+
+