summaryrefslogtreecommitdiffstats
path: root/src/BlockTracer.h
diff options
context:
space:
mode:
authormBornand <63592189+mBornand@users.noreply.github.com>2020-05-08 11:04:07 +0200
committerGitHub <noreply@github.com>2020-05-08 11:04:07 +0200
commit1565d9b3ce8e74cdf8d2c95181f98531794f2c36 (patch)
tree09f6d9158cd2c583789d5c23bc174be115178972 /src/BlockTracer.h
parentFix SetBlockMeta call in observer handler (#4728) (diff)
downloadcuberite-1565d9b3ce8e74cdf8d2c95181f98531794f2c36.tar
cuberite-1565d9b3ce8e74cdf8d2c95181f98531794f2c36.tar.gz
cuberite-1565d9b3ce8e74cdf8d2c95181f98531794f2c36.tar.bz2
cuberite-1565d9b3ce8e74cdf8d2c95181f98531794f2c36.tar.lz
cuberite-1565d9b3ce8e74cdf8d2c95181f98531794f2c36.tar.xz
cuberite-1565d9b3ce8e74cdf8d2c95181f98531794f2c36.tar.zst
cuberite-1565d9b3ce8e74cdf8d2c95181f98531794f2c36.zip
Diffstat (limited to 'src/BlockTracer.h')
-rw-r--r--src/BlockTracer.h24
1 files changed, 9 insertions, 15 deletions
diff --git a/src/BlockTracer.h b/src/BlockTracer.h
index 2cb97c569..46b588771 100644
--- a/src/BlockTracer.h
+++ b/src/BlockTracer.h
@@ -40,45 +40,39 @@ public:
/** Called on each block encountered along the path, including the first block (path start)
When this callback returns true, the tracing is aborted.
*/
- virtual bool OnNextBlock(int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, eBlockFace a_EntryFace) = 0;
+ virtual bool OnNextBlock(Vector3i a_BlockPos, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, eBlockFace a_EntryFace) = 0;
/** Called on each block encountered along the path, including the first block (path start), if chunk data is not loaded
When this callback returns true, the tracing is aborted.
*/
- virtual bool OnNextBlockNoData(int a_BlockX, int a_BlockY, int a_BlockZ, char a_EntryFace)
+ virtual bool OnNextBlockNoData(Vector3i a_BlockPos, char a_EntryFace)
{
- UNUSED(a_BlockX);
- UNUSED(a_BlockY);
- UNUSED(a_BlockZ);
+ UNUSED(a_BlockPos);
UNUSED(a_EntryFace);
return false;
}
- /** Called when the path goes out of world, either below (a_BlockY < 0) or above (a_BlockY >= cChunkDef::Height)
+ /** Called when the path goes out of world, either below (a_BlockPos.y < 0) or above (a_BlockPos.y >= cChunkDef::Height)
The coords specify the exact point at which the path exited the world.
If this callback returns true, the tracing is aborted.
Note that some paths can go out of the world and come back again (parabola),
in such a case this callback is followed by OnIntoWorld() and further OnNextBlock() calls
*/
- virtual bool OnOutOfWorld(double a_BlockX, double a_BlockY, double a_BlockZ)
+ virtual bool OnOutOfWorld(Vector3d a_BlockPos)
{
- UNUSED(a_BlockX);
- UNUSED(a_BlockY);
- UNUSED(a_BlockZ);
+ UNUSED(a_BlockPos);
return false;
}
- /** Called when the path goes into the world, from either below (a_BlockY < 0) or above (a_BlockY >= cChunkDef::Height)
+ /** Called when the path goes into the world, from either below (a_BlockPos.y < 0) or above (a_BlockPos.y >= cChunkDef::Height)
The coords specify the exact point at which the path entered the world.
If this callback returns true, the tracing is aborted.
Note that some paths can go out of the world and come back again (parabola),
in such a case this callback is followed by further OnNextBlock() calls
*/
- virtual bool OnIntoWorld(double a_BlockX, double a_BlockY, double a_BlockZ)
+ virtual bool OnIntoWorld(Vector3d a_BlockPos)
{
- UNUSED(a_BlockX);
- UNUSED(a_BlockY);
- UNUSED(a_BlockZ);
+ UNUSED(a_BlockPos);
return false;
}