From 68fc28857fce6fdc4ebde6fa8ec4760e4a68e86e Mon Sep 17 00:00:00 2001 From: Zach DeCook Date: Wed, 3 Jan 2018 11:33:31 -0500 Subject: 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) --- src/Entities/FallingBlock.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/Entities/FallingBlock.cpp') diff --git a/src/Entities/FallingBlock.cpp b/src/Entities/FallingBlock.cpp index ae5bbd366..cbbb97202 100644 --- a/src/Entities/FallingBlock.cpp +++ b/src/Entities/FallingBlock.cpp @@ -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); -- cgit v1.2.3