summaryrefslogtreecommitdiffstats
path: root/src/Blocks/WorldInterface.h
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-06-21 23:14:23 +0200
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-06-21 23:14:23 +0200
commit7615ed90c020b88db52b0b094f00cd028e326b5a (patch)
treeca7f647e77195a6346a2333f3d9fe5292cd2ed40 /src/Blocks/WorldInterface.h
parentFixed invalid iterators (diff)
parentMerge branch 'master' of https://github.com/mc-server/MCServer (diff)
downloadcuberite-7615ed90c020b88db52b0b094f00cd028e326b5a.tar
cuberite-7615ed90c020b88db52b0b094f00cd028e326b5a.tar.gz
cuberite-7615ed90c020b88db52b0b094f00cd028e326b5a.tar.bz2
cuberite-7615ed90c020b88db52b0b094f00cd028e326b5a.tar.lz
cuberite-7615ed90c020b88db52b0b094f00cd028e326b5a.tar.xz
cuberite-7615ed90c020b88db52b0b094f00cd028e326b5a.tar.zst
cuberite-7615ed90c020b88db52b0b094f00cd028e326b5a.zip
Diffstat (limited to 'src/Blocks/WorldInterface.h')
-rw-r--r--src/Blocks/WorldInterface.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/Blocks/WorldInterface.h b/src/Blocks/WorldInterface.h
index e5638c16e..73e650d8d 100644
--- a/src/Blocks/WorldInterface.h
+++ b/src/Blocks/WorldInterface.h
@@ -6,6 +6,12 @@
class cItems;
+typedef cItemCallback<cBlockEntity> cBlockEntityCallback;
+
+
+
+
+
class cWorldInterface
{
public:
@@ -29,6 +35,9 @@ public:
/** Spawns a mob of the specified type. Returns the mob's EntityID if recognized and spawned, <0 otherwise */
virtual int SpawnMob(double a_PosX, double a_PosY, double a_PosZ, cMonster::eType a_MonsterType) = 0;
+ /** Calls the callback for the block entity at the specified coords; returns false if there's no block entity at those coords, true if found */
+ virtual bool DoWithBlockEntityAt(int a_BlockX, int a_BlockY, int a_BlockZ, cBlockEntityCallback & a_Callback) = 0;
+
/** Sends the block on those coords to the player */
virtual void SendBlockTo(int a_BlockX, int a_BlockY, int a_BlockZ, cPlayer * a_Player) = 0;