diff options
Diffstat (limited to 'source/Blocks')
-rw-r--r-- | source/Blocks/BlockVine.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/source/Blocks/BlockVine.h b/source/Blocks/BlockVine.h index 01aecbe0d..8ad2f4b35 100644 --- a/source/Blocks/BlockVine.h +++ b/source/Blocks/BlockVine.h @@ -17,6 +17,7 @@ public: {
}
+
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
{
a_World->SetBlock(a_BlockX, a_BlockY, a_BlockZ, m_BlockType, cVine::DirectionToMetaData(a_Dir));
@@ -27,17 +28,18 @@ public: virtual bool CanBePlacedAt(cWorld * a_World, int a_BlockX, int a_BlockY, int a_BlockZ, char a_Dir) override
{
if (
- (a_World->GetBlock( a_BlockX, a_BlockY+1, a_BlockZ ) == E_BLOCK_VINES) &&
- (cVine::MetaDataToDirection(a_World->GetBlockMeta( a_BlockX, a_BlockY+1, a_BlockZ )) == a_Dir)
+ (a_World->GetBlock( a_BlockX, a_BlockY + 1, a_BlockZ ) == E_BLOCK_VINES) &&
+ (cVine::MetaDataToDirection(a_World->GetBlockMeta( a_BlockX, a_BlockY + 1, a_BlockZ )) == a_Dir)
)
{
return true;
}
- if ((a_World->GetBlock( a_BlockX, a_BlockY+1, a_BlockZ ) != E_BLOCK_AIR))
+ if ((a_World->GetBlock( a_BlockX, a_BlockY + 1, a_BlockZ ) != E_BLOCK_AIR))
{
AddDirection( a_BlockX, a_BlockY, a_BlockZ, a_Dir, true );
- if(a_World->GetBlock( a_BlockX, a_BlockY, a_BlockZ ) == E_BLOCK_AIR){
+ if (a_World->GetBlock( a_BlockX, a_BlockY, a_BlockZ ) == E_BLOCK_AIR)
+ {
AddDirection( a_BlockX, a_BlockY, a_BlockZ, a_Dir, false );
a_World->FastSetBlock( a_BlockX, a_BlockY, a_BlockZ, E_BLOCK_VINES, 0);
}
@@ -56,6 +58,7 @@ public: return CanBePlacedAt(a_World, a_BlockX, a_BlockY, a_BlockZ, Dir);
}
+
virtual bool DoesIgnoreBuildCollision(void) override
{
return true;
|