summaryrefslogtreecommitdiffstats
path: root/src/LineBlockTracer.cpp
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-07-17 10:06:13 +0200
committermadmaxoft <github@xoft.cz>2014-07-17 10:06:13 +0200
commite66b81b3951680511f2bfffd12c8f96dbbb5865a (patch)
tree5a5bcdad7cc8b70b65bc60a1a3d8f6eb7a85501a /src/LineBlockTracer.cpp
parentMerge remote-tracking branch 'origin/master' into potions (diff)
parentAnother fix for excessive food drain (diff)
downloadcuberite-e66b81b3951680511f2bfffd12c8f96dbbb5865a.tar
cuberite-e66b81b3951680511f2bfffd12c8f96dbbb5865a.tar.gz
cuberite-e66b81b3951680511f2bfffd12c8f96dbbb5865a.tar.bz2
cuberite-e66b81b3951680511f2bfffd12c8f96dbbb5865a.tar.lz
cuberite-e66b81b3951680511f2bfffd12c8f96dbbb5865a.tar.xz
cuberite-e66b81b3951680511f2bfffd12c8f96dbbb5865a.tar.zst
cuberite-e66b81b3951680511f2bfffd12c8f96dbbb5865a.zip
Diffstat (limited to '')
-rw-r--r--src/LineBlockTracer.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/LineBlockTracer.cpp b/src/LineBlockTracer.cpp
index b03652bab..2395aa43e 100644
--- a/src/LineBlockTracer.cpp
+++ b/src/LineBlockTracer.cpp
@@ -203,6 +203,15 @@ bool cLineBlockTracer::Item(cChunk * a_Chunk)
m_Callbacks->OnNoChunk();
return false;
}
+
+ // Move to next block
+ if (!MoveToNextBlock())
+ {
+ // We've reached the end
+ m_Callbacks->OnNoMoreHits();
+ return true;
+ }
+
if (a_Chunk->IsValid())
{
BLOCKTYPE BlockType;
@@ -225,14 +234,6 @@ bool cLineBlockTracer::Item(cChunk * a_Chunk)
}
}
- // Move to next block
- if (!MoveToNextBlock())
- {
- // We've reached the end
- m_Callbacks->OnNoMoreHits();
- return true;
- }
-
// Update the current chunk
if (a_Chunk != NULL)
{