diff options
author | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2014-02-02 23:09:03 +0100 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2014-02-02 23:09:03 +0100 |
commit | 2d0b31e7b671447ca49988d14c13b6eb6bad4cf2 (patch) | |
tree | a0b28406e9c9f561fed241a47f3a51ef4db791a1 /src/Blocks/WorldInterface.h | |
parent | Fixed #624 (diff) | |
parent | Merge pull request #622 from worktycho/registerfix (diff) | |
download | cuberite-2d0b31e7b671447ca49988d14c13b6eb6bad4cf2.tar cuberite-2d0b31e7b671447ca49988d14c13b6eb6bad4cf2.tar.gz cuberite-2d0b31e7b671447ca49988d14c13b6eb6bad4cf2.tar.bz2 cuberite-2d0b31e7b671447ca49988d14c13b6eb6bad4cf2.tar.lz cuberite-2d0b31e7b671447ca49988d14c13b6eb6bad4cf2.tar.xz cuberite-2d0b31e7b671447ca49988d14c13b6eb6bad4cf2.tar.zst cuberite-2d0b31e7b671447ca49988d14c13b6eb6bad4cf2.zip |
Diffstat (limited to 'src/Blocks/WorldInterface.h')
-rw-r--r-- | src/Blocks/WorldInterface.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/Blocks/WorldInterface.h b/src/Blocks/WorldInterface.h new file mode 100644 index 000000000..b6f2f55a7 --- /dev/null +++ b/src/Blocks/WorldInterface.h @@ -0,0 +1,30 @@ + +#pragma once + +#include "BroadcastInterface.h" +#include "../Mobs/Monster.h" + +class cItems; + +class cWorldInterface +{ +public: + + virtual Int64 GetTimeOfDay(void) const = 0; + virtual Int64 GetWorldAge(void) const = 0; + + virtual eDimension GetDimension(void) const = 0; + + virtual cBroadcastInterface & GetBroadcastManager() = 0; + + virtual void DoExplosionAt(double a_ExplosionSize, double a_BlockX, double a_BlockY, double a_BlockZ, bool a_CanCauseFire, eExplosionSource a_Source, void * a_SourceData) = 0; + + /** Spawns item pickups for each item in the list. May compress pickups if too many entities: */ + virtual void SpawnItemPickups(const cItems & a_Pickups, double a_BlockX, double a_BlockY, double a_BlockZ, double a_FlyAwaySpeed = 1.0, bool IsPlayerCreated = false) = 0; + + /** Spawns item pickups for each item in the list. May compress pickups if too many entities. All pickups get the speed specified: */ + virtual void SpawnItemPickups(const cItems & a_Pickups, double a_BlockX, double a_BlockY, double a_BlockZ, double a_SpeedX, double a_SpeedY, double a_SpeedZ, bool IsPlayerCreated = false) = 0; + + /** 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; +}; |