diff options
author | Howaner <franzi.moos@googlemail.com> | 2014-05-07 20:37:36 +0200 |
---|---|---|
committer | Howaner <franzi.moos@googlemail.com> | 2014-05-07 20:37:36 +0200 |
commit | bc4a51781e22b56b8fc13736e94511e7bfd1a367 (patch) | |
tree | 1b9f7d107c3dfa889e37d8d49dd4bd8341978580 /src/Blocks | |
parent | Rename CanChangeDirtToGrass to CanDirtGrowGrass (diff) | |
download | cuberite-bc4a51781e22b56b8fc13736e94511e7bfd1a367.tar cuberite-bc4a51781e22b56b8fc13736e94511e7bfd1a367.tar.gz cuberite-bc4a51781e22b56b8fc13736e94511e7bfd1a367.tar.bz2 cuberite-bc4a51781e22b56b8fc13736e94511e7bfd1a367.tar.lz cuberite-bc4a51781e22b56b8fc13736e94511e7bfd1a367.tar.xz cuberite-bc4a51781e22b56b8fc13736e94511e7bfd1a367.tar.zst cuberite-bc4a51781e22b56b8fc13736e94511e7bfd1a367.zip |
Diffstat (limited to 'src/Blocks')
-rw-r--r-- | src/Blocks/BlockDirt.h | 4 | ||||
-rw-r--r-- | src/Blocks/BlockFluid.h | 12 |
2 files changed, 14 insertions, 2 deletions
diff --git a/src/Blocks/BlockDirt.h b/src/Blocks/BlockDirt.h index b8b23086b..2d4fccbac 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)->CanDirtGrowGrass(AboveMeta)) + if (!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)->CanDirtGrowGrass(AboveMeta))) + if (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/BlockFluid.h b/src/Blocks/BlockFluid.h index d486d642d..e20af9b5c 100644 --- a/src/Blocks/BlockFluid.h +++ b/src/Blocks/BlockFluid.h @@ -49,6 +49,12 @@ public: } super::Check(a_ChunkInterface, a_PluginInterface, a_RelX, a_RelY, a_RelZ, a_Chunk); } + + + virtual bool CanDirtGrowGrass(NIBBLETYPE a_Meta) override + { + return false; + } } ; @@ -132,6 +138,12 @@ public: } // for i - CrossCoords[] return false; } + + + virtual bool CanDirtGrowGrass(NIBBLETYPE a_Meta) override + { + return false; + } } ; |