summaryrefslogtreecommitdiffstats
path: root/AnvilStats/Callback.h
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-09-28 22:17:29 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-09-28 22:17:29 +0200
commit3165458c5993a447556efbbefc5aeb4352353347 (patch)
tree89195d960927cb1f43b871d367efd7f3081ace71 /AnvilStats/Callback.h
parentAnvilStats: improved speed (~5x) by caching the entire region file in the processing thread (diff)
downloadcuberite-3165458c5993a447556efbbefc5aeb4352353347.tar
cuberite-3165458c5993a447556efbbefc5aeb4352353347.tar.gz
cuberite-3165458c5993a447556efbbefc5aeb4352353347.tar.bz2
cuberite-3165458c5993a447556efbbefc5aeb4352353347.tar.lz
cuberite-3165458c5993a447556efbbefc5aeb4352353347.tar.xz
cuberite-3165458c5993a447556efbbefc5aeb4352353347.tar.zst
cuberite-3165458c5993a447556efbbefc5aeb4352353347.zip
Diffstat (limited to 'AnvilStats/Callback.h')
-rw-r--r--AnvilStats/Callback.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/AnvilStats/Callback.h b/AnvilStats/Callback.h
index b18f4947a..66d6bcfae 100644
--- a/AnvilStats/Callback.h
+++ b/AnvilStats/Callback.h
@@ -51,6 +51,9 @@ public:
virtual bool OnHeightMap(const int * a_HeightMap) { return true; }
+ /** If there is data for the section, this callback is called; otherwise OnEmptySection() is called instead.
+ All OnSection() callbacks are called first, and only then all the remaining sections are reported in OnEmptySection().
+ */
virtual bool OnSection(
unsigned char a_Y,
const BLOCKTYPE * a_BlockTypes,
@@ -60,6 +63,11 @@ public:
const NIBBLETYPE * a_BlockSkyLight
) { return true; }
+ /** If there is no data for a section, this callback is called; otherwise OnSection() is called instead.
+ OnEmptySection() callbacks are called after all OnSection() callbacks.
+ */
+ virtual bool OnEmptySection(unsigned char a_Y) { return false; }
+
// TODO: entities, tile-entities, tile-ticks
} ;