summaryrefslogtreecommitdiffstats
path: root/src/ChunkMap.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@outlook.com>2020-07-29 02:18:59 +0200
committerTiger Wang <ziwei.tiger@outlook.com>2020-08-02 16:52:06 +0200
commit225c2fa9f6bc2ebffcc9160090482e6833a220ce (patch)
treeb72a5b27b49e38fe160da580a6f659a1a9d93308 /src/ChunkMap.cpp
parentAdd WakeUp/AddBlock distinction (diff)
downloadcuberite-225c2fa9f6bc2ebffcc9160090482e6833a220ce.tar
cuberite-225c2fa9f6bc2ebffcc9160090482e6833a220ce.tar.gz
cuberite-225c2fa9f6bc2ebffcc9160090482e6833a220ce.tar.bz2
cuberite-225c2fa9f6bc2ebffcc9160090482e6833a220ce.tar.lz
cuberite-225c2fa9f6bc2ebffcc9160090482e6833a220ce.tar.xz
cuberite-225c2fa9f6bc2ebffcc9160090482e6833a220ce.tar.zst
cuberite-225c2fa9f6bc2ebffcc9160090482e6833a220ce.zip
Diffstat (limited to 'src/ChunkMap.cpp')
-rw-r--r--src/ChunkMap.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/ChunkMap.cpp b/src/ChunkMap.cpp
index 43253a91d..6b1ece612 100644
--- a/src/ChunkMap.cpp
+++ b/src/ChunkMap.cpp
@@ -227,7 +227,8 @@ void cChunkMap::WakeUpSimulators(Vector3i a_Block)
{
return;
}
- m_World->GetSimulatorManager()->WakeUp(a_Block, Chunk);
+
+ m_World->GetSimulatorManager()->WakeUp(*Chunk, cChunkDef::AbsoluteToRelative(a_Block, Chunk->GetPos()));
}
@@ -644,7 +645,6 @@ void cChunkMap::SetBlock(Vector3i a_BlockPos, BLOCKTYPE a_BlockType, NIBBLETYPE
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);
}
}
@@ -867,7 +867,6 @@ bool cChunkMap::DigBlock(Vector3i a_BlockPos)
}
destChunk->SetBlock(relPos, E_BLOCK_AIR, 0);
- m_World->GetSimulatorManager()->WakeUp(a_BlockPos, destChunk);
}
return true;
}