summaryrefslogtreecommitdiffstats
path: root/src/World.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2015-05-07 16:14:56 +0200
committerMattes D <github@xoft.cz>2015-05-07 16:14:56 +0200
commit4888f671d15c47cf79b289a72fb5068cc6a6e35b (patch)
tree462ab2388a09dada48478104553fb9f6fedcb358 /src/World.cpp
parentMerge pull request #1953 from mc-server/bearbin-fadwp (diff)
parentAdded support for additional data in the ParticleEffect Packet (diff)
downloadcuberite-4888f671d15c47cf79b289a72fb5068cc6a6e35b.tar
cuberite-4888f671d15c47cf79b289a72fb5068cc6a6e35b.tar.gz
cuberite-4888f671d15c47cf79b289a72fb5068cc6a6e35b.tar.bz2
cuberite-4888f671d15c47cf79b289a72fb5068cc6a6e35b.tar.lz
cuberite-4888f671d15c47cf79b289a72fb5068cc6a6e35b.tar.xz
cuberite-4888f671d15c47cf79b289a72fb5068cc6a6e35b.tar.zst
cuberite-4888f671d15c47cf79b289a72fb5068cc6a6e35b.zip
Diffstat (limited to '')
-rw-r--r--src/World.cpp24
1 files changed, 15 insertions, 9 deletions
diff --git a/src/World.cpp b/src/World.cpp
index 87209e4c2..6c2e31965 100644
--- a/src/World.cpp
+++ b/src/World.cpp
@@ -57,7 +57,7 @@
#include <stdlib.h>
#endif
-
+#include "Broadcaster.h"
@@ -1459,6 +1459,15 @@ bool cWorld::DoWithChunk(int a_ChunkX, int a_ChunkZ, cChunkCallback & a_Callback
+bool cWorld::DoWithChunkAt(Vector3i a_BlockPos, std::function<bool(cChunk &)> a_Callback)
+{
+ return m_ChunkMap->DoWithChunkAt(a_BlockPos, a_Callback);
+}
+
+
+
+
+
void cWorld::GrowTree(int a_X, int a_Y, int a_Z)
{
if (GetBlock(a_X, a_Y, a_Z) == E_BLOCK_SAPLING)
@@ -2241,14 +2250,6 @@ void cWorld::BroadcastEntityAnimation(const cEntity & a_Entity, char a_Animation
-void cWorld::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)
-{
- m_ChunkMap->BroadcastParticleEffect(a_ParticleName, a_SrcX, a_SrcY, a_SrcZ, a_OffsetX, a_OffsetY, a_OffsetZ, a_ParticleData, a_ParticleAmount, a_Exclude);
-}
-
-
-
-
void cWorld::BroadcastPlayerListAddPlayer(const cPlayer & a_Player, const cClientHandle * a_Exclude)
{
@@ -3770,5 +3771,10 @@ void cWorld::cChunkGeneratorCallbacks::CallHookChunkGenerated (cChunkDesc & a_Ch
+cBroadcaster cWorld::GetBroadcaster()
+{
+ return cBroadcaster(this);
+}
+