summaryrefslogtreecommitdiffstats
path: root/src/ChunkMap.cpp
diff options
context:
space:
mode:
authorAlexander Harkness <me@bearbin.net>2020-03-27 13:01:50 +0100
committerAlexander Harkness <me@bearbin.net>2020-03-27 13:01:50 +0100
commit3a2f364c9502c077181f1dcb8131155b9e005b00 (patch)
treee23a283be1d0e92cbd4f7c51386271eddaef446f /src/ChunkMap.cpp
parentCI: Install ccache on macos (#4489) (diff)
downloadcuberite-3a2f364c9502c077181f1dcb8131155b9e005b00.tar
cuberite-3a2f364c9502c077181f1dcb8131155b9e005b00.tar.gz
cuberite-3a2f364c9502c077181f1dcb8131155b9e005b00.tar.bz2
cuberite-3a2f364c9502c077181f1dcb8131155b9e005b00.tar.lz
cuberite-3a2f364c9502c077181f1dcb8131155b9e005b00.tar.xz
cuberite-3a2f364c9502c077181f1dcb8131155b9e005b00.tar.zst
cuberite-3a2f364c9502c077181f1dcb8131155b9e005b00.zip
Diffstat (limited to '')
-rw-r--r--src/ChunkMap.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/ChunkMap.cpp b/src/ChunkMap.cpp
index 6edcf3d54..9c721610e 100644
--- a/src/ChunkMap.cpp
+++ b/src/ChunkMap.cpp
@@ -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);