summaryrefslogtreecommitdiffstats
path: root/src/World.h
diff options
context:
space:
mode:
authortycho <tycho@localhost>2015-03-21 18:17:26 +0100
committertycho <tycho@localhost>2015-05-07 04:47:46 +0200
commit448df85e569e85e1b4da4eac685950273f30ae1f (patch)
tree045241fff430ae2ffe0b97d7151e44293ad76467 /src/World.h
parentMerge pull request #1946 from SafwatHalaby/lean (diff)
downloadcuberite-448df85e569e85e1b4da4eac685950273f30ae1f.tar
cuberite-448df85e569e85e1b4da4eac685950273f30ae1f.tar.gz
cuberite-448df85e569e85e1b4da4eac685950273f30ae1f.tar.bz2
cuberite-448df85e569e85e1b4da4eac685950273f30ae1f.tar.lz
cuberite-448df85e569e85e1b4da4eac685950273f30ae1f.tar.xz
cuberite-448df85e569e85e1b4da4eac685950273f30ae1f.tar.zst
cuberite-448df85e569e85e1b4da4eac685950273f30ae1f.zip
Diffstat (limited to 'src/World.h')
-rw-r--r--src/World.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/World.h b/src/World.h
index 1de241f60..624262cd3 100644
--- a/src/World.h
+++ b/src/World.h
@@ -55,6 +55,7 @@ class cMobHeadEntity;
class cCompositeChat;
class cCuboid;
class cSetChunkData;
+class cBroadcaster;
typedef std::list< cPlayer * > cPlayerList;
@@ -243,7 +244,6 @@ public:
void BroadcastEntityStatus (const cEntity & a_Entity, char a_Status, const cClientHandle * a_Exclude = nullptr);
void BroadcastEntityVelocity (const cEntity & a_Entity, const cClientHandle * a_Exclude = nullptr);
virtual void BroadcastEntityAnimation (const cEntity & a_Entity, char a_Animation, const cClientHandle * a_Exclude = nullptr) override; // tolua_export
- void BroadcastParticleEffect (const AString & a_ParticleName, float a_SrcX, float a_SrcY, float a_SrcZ, float a_OffsetX, float a_OffsetY, float a_OffsetZ, float a_ParticleData, int a_ParticleAmount, cClientHandle * a_Exclude = nullptr); // tolua_export
void BroadcastPlayerListAddPlayer (const cPlayer & a_Player, const cClientHandle * a_Exclude = nullptr);
void BroadcastPlayerListRemovePlayer (const cPlayer & a_Player, const cClientHandle * a_Exclude = nullptr);
void BroadcastPlayerListUpdateGameMode (const cPlayer & a_Player, const cClientHandle * a_Exclude = nullptr);
@@ -610,6 +610,9 @@ public:
/** Calls the callback for the chunk specified, with ChunkMapCS locked; returns false if the chunk doesn't exist, otherwise returns the same value as the callback */
bool DoWithChunk(int a_ChunkX, int a_ChunkZ, cChunkCallback & a_Callback);
+ /** Calls the callback for the chunk at the block position specified, with ChunkMapCS locked; returns false if the chunk doesn't exist, otherwise returns the same value as the callback **/
+ bool DoWithChunkAt(Vector3i a_BlockPos, std::function<bool(cChunk &)> a_Callback);
+
void GrowTreeImage(const sSetBlockVector & a_Blocks);
// tolua_begin
@@ -828,6 +831,8 @@ public:
This function allows nesting and task-concurrency (multiple separate tasks can request ticking and as long
as at least one requests is active the chunk will be ticked). */
void SetChunkAlwaysTicked(int a_ChunkX, int a_ChunkZ, bool a_AlwaysTicked = true); // tolua_export
+
+ cBroadcaster GetBroadcaster();
private: