summaryrefslogtreecommitdiffstats
path: root/src/Blocks/BlockTrapdoor.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/Blocks/BlockTrapdoor.h22
1 files changed, 13 insertions, 9 deletions
diff --git a/src/Blocks/BlockTrapdoor.h b/src/Blocks/BlockTrapdoor.h
index 8fdae6028..e5361706c 100644
--- a/src/Blocks/BlockTrapdoor.h
+++ b/src/Blocks/BlockTrapdoor.h
@@ -2,32 +2,36 @@
#pragma once
#include "BlockHandler.h"
-#include "MetaRotator.h"
+#include "Mixins.h"
#include "../EffectID.h"
class cBlockTrapdoorHandler :
- public cMetaRotator<cBlockHandler, 0x03, 0x01, 0x02, 0x00, 0x03, false>
+ public cClearMetaOnDrop<cMetaRotator<cBlockHandler, 0x03, 0x01, 0x02, 0x00, 0x03, false>>
{
+ using super = cClearMetaOnDrop<cMetaRotator<cBlockHandler, 0x03, 0x01, 0x02, 0x00, 0x03, false>>;
+
public:
- cBlockTrapdoorHandler(BLOCKTYPE a_BlockType)
- : cMetaRotator<cBlockHandler, 0x03, 0x01, 0x02, 0x00, 0x03, false>(a_BlockType)
- {
- }
- virtual void ConvertToPickups(cItems & a_Pickups, NIBBLETYPE a_BlockMeta) override
+ cBlockTrapdoorHandler(BLOCKTYPE a_BlockType):
+ super(a_BlockType)
{
- // Reset meta to zero
- a_Pickups.push_back(cItem(m_BlockType, 1, 0));
}
+
+
+
virtual bool IsUseable(void) override
{
return true;
}
+
+
+
+
virtual bool OnUse(cChunkInterface & a_ChunkInterface, cWorldInterface & a_WorldInterface, cPlayer & a_Player, int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_BlockFace, int a_CursorX, int a_CursorY, int a_CursorZ) override
{
if (m_BlockType == E_BLOCK_IRON_TRAPDOOR)