summaryrefslogtreecommitdiffstats
path: root/source/cChunk.cpp
diff options
context:
space:
mode:
authorfaketruth <faketruth@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-03-01 16:18:59 +0100
committerfaketruth <faketruth@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-03-01 16:18:59 +0100
commit867fc8ee0dbebd3c09a4f7cdcbd5fb4d56f194dc (patch)
treea2f8b4a22a9b721d94ffa595ef57a07d1339f482 /source/cChunk.cpp
parentFixed the authenticator bug (diff)
downloadcuberite-867fc8ee0dbebd3c09a4f7cdcbd5fb4d56f194dc.tar
cuberite-867fc8ee0dbebd3c09a4f7cdcbd5fb4d56f194dc.tar.gz
cuberite-867fc8ee0dbebd3c09a4f7cdcbd5fb4d56f194dc.tar.bz2
cuberite-867fc8ee0dbebd3c09a4f7cdcbd5fb4d56f194dc.tar.lz
cuberite-867fc8ee0dbebd3c09a4f7cdcbd5fb4d56f194dc.tar.xz
cuberite-867fc8ee0dbebd3c09a4f7cdcbd5fb4d56f194dc.tar.zst
cuberite-867fc8ee0dbebd3c09a4f7cdcbd5fb4d56f194dc.zip
Diffstat (limited to '')
-rw-r--r--source/cChunk.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/source/cChunk.cpp b/source/cChunk.cpp
index 75dd4e77e..7e79fc806 100644
--- a/source/cChunk.cpp
+++ b/source/cChunk.cpp
@@ -464,6 +464,10 @@ void cChunk::Tick(float a_Dt, MTRand & a_TickRandom)
if( m_World->GetBlock( XX, YY, ZZ ) == E_BLOCK_AIR )
{
SetBlock( X, Y, Z, 0, 0 );
+
+ Vector3i wPos = PositionToWorldPosition( Vector3i(X, Y, Z) );
+
+ m_World->GetSimulatorManager()->WakeUp(wPos.x, wPos.y, wPos.z);
if (isRedstone) {
cRedstone Redstone(m_World);
Redstone.ChangeRedstone( (X+m_PosX*16), (Y+m_PosY*16), (Z+m_PosZ*16), false );
@@ -953,7 +957,8 @@ void cChunk::FastSetBlock( int a_X, int a_Y, int a_Z, char a_BlockType, char a_B
const int index = a_Y + (a_Z * 128) + (a_X * 128 * 16);
const char OldBlock = m_BlockType[index];
- if (OldBlock == a_BlockType)
+ const char OldBlockMeta = GetLight( m_BlockMeta, index );
+ if (OldBlock == a_BlockType && OldBlockMeta == a_BlockMeta)
{
return;
}
@@ -1399,6 +1404,15 @@ void cChunk::PositionToWorldPosition(int a_ChunkX, int a_ChunkY, int a_ChunkZ, i
+Vector3i cChunk::PositionToWorldPosition( const Vector3i & a_InChunkPos )
+{
+ return Vector3i( m_PosX * 16 + a_InChunkPos.x, a_InChunkPos.y, m_PosZ * 16 + a_InChunkPos.z );
+}
+
+
+
+
+
#if !C_CHUNK_USE_INLINE
# include "cChunk.inc"
#endif