summaryrefslogtreecommitdiffstats
path: root/source/Blocks/BlockDispenser.h
diff options
context:
space:
mode:
Diffstat (limited to 'source/Blocks/BlockDispenser.h')
-rw-r--r--source/Blocks/BlockDispenser.h25
1 files changed, 17 insertions, 8 deletions
diff --git a/source/Blocks/BlockDispenser.h b/source/Blocks/BlockDispenser.h
index 581e0f49b..a1aa45964 100644
--- a/source/Blocks/BlockDispenser.h
+++ b/source/Blocks/BlockDispenser.h
@@ -14,16 +14,25 @@ class cBlockDispenserHandler :
public cBlockEntityHandler
{
public:
- cBlockDispenserHandler(BLOCKTYPE a_BlockType)
- : cBlockEntityHandler(a_BlockType)
+ cBlockDispenserHandler(BLOCKTYPE a_BlockType) :
+ cBlockEntityHandler(a_BlockType)
{
}
- virtual void PlaceBlock(cWorld *a_World, cPlayer *a_Player, NIBBLETYPE a_BlockMeta, int a_BlockX, int a_BlockY, int a_BlockZ, char a_Dir) override
+
+ virtual bool GetPlacementBlockTypeMeta(
+ cWorld * a_World, cPlayer * a_Player,
+ int a_BlockX, int a_BlockY, int a_BlockZ, char a_BlockFace,
+ int a_CursorX, int a_CursorY, int a_CursorZ,
+ BLOCKTYPE & a_BlockType, NIBBLETYPE & a_BlockMeta
+ ) override
{
- a_World->SetBlock(a_BlockX, a_BlockY, a_BlockZ, m_BlockType, cPiston::RotationPitchToMetaData(a_Player->GetRotation(), 0));
- OnPlacedByPlayer(a_World, a_Player, a_BlockX, a_BlockY, a_BlockZ, a_Dir);
+ a_BlockType = m_BlockType;
+ a_BlockMeta = cPiston::RotationPitchToMetaData(a_Player->GetRotation(), 0);
+ return true;
}
-
-
-}; \ No newline at end of file
+} ;
+
+
+
+