1
0

Concrete mixing (#4096)

Adds a block handler for concrete powder and implements hardening to concrete.
Concrete powder turns into concrete when:
* It is next to water when it receives a block update
* It falls onto a water block (even with Physics SandInstantFall=1)
This commit is contained in:
Zach DeCook
2018-01-03 11:33:31 -05:00
committed by peterbell10
parent 177273006e
commit 68fc28857f
6 changed files with 122 additions and 0 deletions

View File

@@ -86,6 +86,13 @@ void cFallingBlock::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
Destroy(true);
return;
}
else if ((m_BlockType == E_BLOCK_CONCRETE_POWDER) && IsBlockWater(BlockBelow))
{
// Concrete powder falling into water solidifies on the first water it touches
cSandSimulator::FinishFalling(m_World, BlockX, BlockY, BlockZ, E_BLOCK_CONCRETE, m_BlockMeta);
Destroy(true);
return;
}
float MilliDt = a_Dt.count() * 0.001f;
AddSpeedY(MilliDt * -9.8f);