summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-10-22 20:04:15 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-10-22 20:04:15 +0200
commit331d012849ce3c0b992c6e9f0489108ffe413ef6 (patch)
tree8980f38cd82652be37014e09fa5d8ec1d88a55b5
parentVine decay (patch contributed by funmaker) (diff)
downloadcuberite-331d012849ce3c0b992c6e9f0489108ffe413ef6.tar
cuberite-331d012849ce3c0b992c6e9f0489108ffe413ef6.tar.gz
cuberite-331d012849ce3c0b992c6e9f0489108ffe413ef6.tar.bz2
cuberite-331d012849ce3c0b992c6e9f0489108ffe413ef6.tar.lz
cuberite-331d012849ce3c0b992c6e9f0489108ffe413ef6.tar.xz
cuberite-331d012849ce3c0b992c6e9f0489108ffe413ef6.tar.zst
cuberite-331d012849ce3c0b992c6e9f0489108ffe413ef6.zip
-rw-r--r--source/Blocks/BlockVine.h11
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;