summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/Blocks/BlockBed.h2
-rw-r--r--src/Blocks/BlockDirt.h4
-rw-r--r--src/Blocks/BlockHandler.cpp4
-rw-r--r--src/Blocks/BlockHandler.h4
-rw-r--r--src/Blocks/BlockSlab.h2
-rw-r--r--src/Blocks/BlockStairs.h2
6 files changed, 9 insertions, 9 deletions
diff --git a/src/Blocks/BlockBed.h b/src/Blocks/BlockBed.h
index cfd732d38..51e79b888 100644
--- a/src/Blocks/BlockBed.h
+++ b/src/Blocks/BlockBed.h
@@ -39,7 +39,7 @@ public:
}
- virtual bool CanChangeDirtToGrass(BLOCKTYPE a_Block, NIBBLETYPE a_Meta) override
+ virtual bool CanDirtGrowGrass(NIBBLETYPE a_Meta) override
{
return true;
}
diff --git a/src/Blocks/BlockDirt.h b/src/Blocks/BlockDirt.h
index 0c550257e..b8b23086b 100644
--- a/src/Blocks/BlockDirt.h
+++ b/src/Blocks/BlockDirt.h
@@ -38,7 +38,7 @@ public:
BLOCKTYPE Above;
NIBBLETYPE AboveMeta;
a_Chunk.GetBlockTypeMeta(a_RelX, a_RelY + 1, a_RelZ, Above, AboveMeta);
- if ((IsBlockWater(Above)) || !cBlockInfo::GetHandler(Above)->CanChangeDirtToGrass(Above, AboveMeta))
+ if ((IsBlockWater(Above)) || !cBlockInfo::GetHandler(Above)->CanDirtGrowGrass(AboveMeta))
{
a_Chunk.FastSetBlock(a_RelX, a_RelY, a_RelZ, E_BLOCK_DIRT, E_META_DIRT_NORMAL);
return;
@@ -79,7 +79,7 @@ public:
BLOCKTYPE AboveDest;
NIBBLETYPE AboveMeta;
Chunk->GetBlockTypeMeta(BlockX, BlockY + 1, BlockZ, AboveDest, AboveMeta);
- if ((!IsBlockWater(AboveDest)) && (cBlockInfo::GetHandler(AboveDest)->CanChangeDirtToGrass(AboveDest, AboveMeta)))
+ if ((!IsBlockWater(AboveDest)) && (cBlockInfo::GetHandler(AboveDest)->CanDirtGrowGrass(AboveMeta)))
{
if (!cRoot::Get()->GetPluginManager()->CallHookBlockSpread((cWorld*) &a_WorldInterface, BlockX * cChunkDef::Width, BlockY, BlockZ * cChunkDef::Width, ssGrassSpread))
{
diff --git a/src/Blocks/BlockHandler.cpp b/src/Blocks/BlockHandler.cpp
index 850bae6b9..304e35e84 100644
--- a/src/Blocks/BlockHandler.cpp
+++ b/src/Blocks/BlockHandler.cpp
@@ -400,9 +400,9 @@ bool cBlockHandler::CanBeAt(cChunkInterface & a_ChunkInterface, int a_BlockX, in
-bool cBlockHandler::CanChangeDirtToGrass(BLOCKTYPE a_Block, NIBBLETYPE a_Meta)
+bool cBlockHandler::CanDirtGrowGrass(NIBBLETYPE a_Meta)
{
- return ((cBlockInfo::IsTransparent(a_Block)) || (cBlockInfo::IsOneHitDig(a_Block)));
+ return ((cBlockInfo::IsTransparent(m_BlockType)) || (cBlockInfo::IsOneHitDig(m_BlockType)));
}
diff --git a/src/Blocks/BlockHandler.h b/src/Blocks/BlockHandler.h
index 4d6a2abb6..fb6cae729 100644
--- a/src/Blocks/BlockHandler.h
+++ b/src/Blocks/BlockHandler.h
@@ -86,8 +86,8 @@ public:
/// Checks if the block can stay at the specified relative coords in the chunk
virtual bool CanBeAt(cChunkInterface & a_ChunkInterface, int a_RelX, int a_RelY, int a_RelZ, const cChunk & a_Chunk);
- /** Can change the block under this block to grass? */
- virtual bool CanChangeDirtToGrass(BLOCKTYPE a_Block, NIBBLETYPE a_Meta);
+ /** Can the dirt under this block grow to grass? */
+ virtual bool CanDirtGrowGrass(NIBBLETYPE a_Meta);
/** Checks if the block can be placed at this point.
Default: CanBeAt(...)
diff --git a/src/Blocks/BlockSlab.h b/src/Blocks/BlockSlab.h
index 84580b062..b6bd12588 100644
--- a/src/Blocks/BlockSlab.h
+++ b/src/Blocks/BlockSlab.h
@@ -98,7 +98,7 @@ public:
}
- virtual bool CanChangeDirtToGrass(BLOCKTYPE a_Block, NIBBLETYPE a_Meta) override
+ virtual bool CanDirtGrowGrass(NIBBLETYPE a_Meta) override
{
return (a_Meta & 0x8);
}
diff --git a/src/Blocks/BlockStairs.h b/src/Blocks/BlockStairs.h
index d6363fed9..a49fda5ae 100644
--- a/src/Blocks/BlockStairs.h
+++ b/src/Blocks/BlockStairs.h
@@ -78,7 +78,7 @@ public:
a_Pickups.push_back(cItem(m_BlockType, 1, 0));
}
- virtual bool CanChangeDirtToGrass(BLOCKTYPE a_Block, NIBBLETYPE a_Meta) override
+ virtual bool CanDirtGrowGrass(NIBBLETYPE a_Meta) override
{
return true;
}