summaryrefslogtreecommitdiffstats
path: root/source/cChunk.cpp
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-09-04 17:07:08 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-09-04 17:07:08 +0200
commit58b1b3160dd0622a3609a3c8c8d93f6482fb94af (patch)
tree71b2698bef1a88c5eed7b05d923178f2355285e7 /source/cChunk.cpp
parentFixed a typo in PDB packlist (diff)
downloadcuberite-58b1b3160dd0622a3609a3c8c8d93f6482fb94af.tar
cuberite-58b1b3160dd0622a3609a3c8c8d93f6482fb94af.tar.gz
cuberite-58b1b3160dd0622a3609a3c8c8d93f6482fb94af.tar.bz2
cuberite-58b1b3160dd0622a3609a3c8c8d93f6482fb94af.tar.lz
cuberite-58b1b3160dd0622a3609a3c8c8d93f6482fb94af.tar.xz
cuberite-58b1b3160dd0622a3609a3c8c8d93f6482fb94af.tar.zst
cuberite-58b1b3160dd0622a3609a3c8c8d93f6482fb94af.zip
Diffstat (limited to 'source/cChunk.cpp')
-rw-r--r--source/cChunk.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/source/cChunk.cpp b/source/cChunk.cpp
index 4e32b4dad..6295d4bba 100644
--- a/source/cChunk.cpp
+++ b/source/cChunk.cpp
@@ -580,15 +580,22 @@ void cChunk::TickBlocks(MTRand & a_TickRandom)
default:
{
- cBlockHandler *Handler = BlockHandler(ID);
- if(Handler->NeedsRandomTicks())
- Handler->OnUpdate(m_World, m_BlockTickX + m_PosX*Width, m_BlockTickY, m_BlockTickZ + m_PosZ*Width);
+ cBlockHandler * Handler = BlockHandler(ID);
+ ASSERT(Handler != NULL); // Happenned on server restart, FS #243
+ if (Handler->NeedsRandomTicks())
+ {
+ Handler->OnUpdate(m_World, m_BlockTickX + m_PosX * Width, m_BlockTickY, m_BlockTickZ + m_PosZ * Width);
+ }
break;
}
}
}
}
+
+
+
+
void cChunk::TickMelonPumpkin(int a_RelX, int a_RelY, int a_RelZ, int a_BlockIdx, BLOCKTYPE a_BlockType, MTRand & a_TickRandom)
{
NIBBLETYPE Meta = GetMeta(a_BlockIdx);