diff options
author | madmaxoft <github@xoft.cz> | 2014-02-18 13:06:18 +0100 |
---|---|---|
committer | madmaxoft <github@xoft.cz> | 2014-02-18 13:49:23 +0100 |
commit | 803ea412361ee2f4b1d74a811ddbee05f50c9345 (patch) | |
tree | 7d4b18657afb9eb541aeb0e2cd46e8da258251e1 /src/World.cpp | |
parent | Added a bit more documentation to cForEachChunkProvider. (diff) | |
download | cuberite-803ea412361ee2f4b1d74a811ddbee05f50c9345.tar cuberite-803ea412361ee2f4b1d74a811ddbee05f50c9345.tar.gz cuberite-803ea412361ee2f4b1d74a811ddbee05f50c9345.tar.bz2 cuberite-803ea412361ee2f4b1d74a811ddbee05f50c9345.tar.lz cuberite-803ea412361ee2f4b1d74a811ddbee05f50c9345.tar.xz cuberite-803ea412361ee2f4b1d74a811ddbee05f50c9345.tar.zst cuberite-803ea412361ee2f4b1d74a811ddbee05f50c9345.zip |
Diffstat (limited to 'src/World.cpp')
-rw-r--r-- | src/World.cpp | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/World.cpp b/src/World.cpp index d67ad36d1..c9d7f42be 100644 --- a/src/World.cpp +++ b/src/World.cpp @@ -1487,6 +1487,33 @@ EMCSBiome cWorld::GetBiomeAt (int a_BlockX, int a_BlockZ) +bool cWorld::SetBiomeAt(int a_BlockX, int a_BlockZ, EMCSBiome a_Biome) +{ + return m_ChunkMap->SetBiomeAt(a_BlockX, a_BlockZ, a_Biome); +} + + + + + +bool cWorld::SetAreaBiome(int a_MinX, int a_MaxX, int a_MinZ, int a_MaxZ, EMCSBiome a_Biome) +{ + return m_ChunkMap->SetAreaBiome(a_MinX, a_MaxX, a_MinZ, a_MaxZ, a_Biome); +} + + + + + +bool cWorld::SetAreaBiome(const cCuboid & a_Area, EMCSBiome a_Biome) +{ + return SetAreaBiome(a_Area.p1.x, a_Area.p2.x, a_Area.p1.z, a_Area.p2.z, a_Biome); +} + + + + + void cWorld::SetBlock(int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta) { m_ChunkMap->SetBlock(*this, a_BlockX, a_BlockY, a_BlockZ, a_BlockType, a_BlockMeta); @@ -2490,6 +2517,16 @@ void cWorld::SendChunkTo(int a_ChunkX, int a_ChunkZ, cClientHandle * a_Client) +void cWorld::ForceSendChunkTo(int a_ChunkX, int a_ChunkZ, cClientHandle * a_Client) +{ + a_Client->AddWantedChunk(a_ChunkX, a_ChunkZ); + m_ChunkSender.QueueSendChunkTo(a_ChunkX, a_ChunkZ, a_Client); +} + + + + + void cWorld::RemoveClientFromChunkSender(cClientHandle * a_Client) { m_ChunkSender.RemoveClient(a_Client); |