1
0
Fork 0
commit 28654b1f42a98c0f9910e333a9c8074fe30aff24
Author: Alexander Harkness <me@bearbin.net>
Date:   Fri Mar 27 11:58:34 2020 +0000

    Remove whitespace

commit f1492e174b51e168bf4fb150c2d7b7096c393057
Author: Odin <SirRobo@users.noreply.github.com>
Date:   Fri Mar 27 04:30:32 2020 +1100

    Add issue comment

commit b64166d68a327e8a9bf80720ff6e9c6af93921b5
Author: Odin <SirRobo@users.noreply.github.com>
Date:   Fri Mar 27 03:42:35 2020 +1100

    Don't run OnBroken with pistons

    Stops piston duplication bug and doesn't break water and lava simulation
This commit is contained in:
Alexander Harkness 2020-03-27 12:01:50 +00:00
parent 396bf622ca
commit 3a2f364c95
No known key found for this signature in database
GPG Key ID: 5187245ADF160B76
1 changed files with 8 additions and 1 deletions

View File

@ -639,7 +639,14 @@ void cChunkMap::SetBlock(Vector3i a_BlockPos, BLOCKTYPE a_BlockType, NIBBLETYPE
NIBBLETYPE blockMeta;
GetBlockTypeMeta(a_BlockPos, blockType, blockMeta);
cChunkInterface ChunkInterface(this);
BlockHandler(blockType)->OnBroken(ChunkInterface, *m_World, a_BlockPos, blockType, blockMeta);
// Hotfix for https://github.com/cuberite/cuberite/issues/4468
// Should be removed when a proper fix is found.
if ((blockType != E_BLOCK_PISTON) && (blockType != E_BLOCK_STICKY_PISTON) && (blockType != E_BLOCK_PISTON_EXTENSION))
{
BlockHandler(blockType)->OnBroken(ChunkInterface, *m_World, a_BlockPos, blockType, blockMeta);
}
chunk->SetBlock(relPos, a_BlockType, a_BlockMeta);
m_World->GetSimulatorManager()->WakeUp(a_BlockPos, chunk);
BlockHandler(a_BlockType)->OnPlaced(ChunkInterface, *m_World, a_BlockPos, a_BlockType, a_BlockMeta);