summaryrefslogtreecommitdiffstats
path: root/src/BlockArea.cpp
diff options
context:
space:
mode:
authorTycho <work.tycho+git@gmail.com>2014-01-20 18:37:31 +0100
committerTycho <work.tycho+git@gmail.com>2014-01-20 18:37:31 +0100
commit613f238ab630d1cfb86e2dbdccb1e9cbf93539dd (patch)
tree304260643ecc3c99939c34621d7908fa3031dc33 /src/BlockArea.cpp
parentMerge branch 'master' into GeneratingBenchmark (diff)
parentSeperated BlockArea From World (diff)
downloadcuberite-613f238ab630d1cfb86e2dbdccb1e9cbf93539dd.tar
cuberite-613f238ab630d1cfb86e2dbdccb1e9cbf93539dd.tar.gz
cuberite-613f238ab630d1cfb86e2dbdccb1e9cbf93539dd.tar.bz2
cuberite-613f238ab630d1cfb86e2dbdccb1e9cbf93539dd.tar.lz
cuberite-613f238ab630d1cfb86e2dbdccb1e9cbf93539dd.tar.xz
cuberite-613f238ab630d1cfb86e2dbdccb1e9cbf93539dd.tar.zst
cuberite-613f238ab630d1cfb86e2dbdccb1e9cbf93539dd.zip
Diffstat (limited to 'src/BlockArea.cpp')
-rw-r--r--src/BlockArea.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/BlockArea.cpp b/src/BlockArea.cpp
index 910661f60..c33d2712b 100644
--- a/src/BlockArea.cpp
+++ b/src/BlockArea.cpp
@@ -6,7 +6,6 @@
#include "Globals.h"
#include "BlockArea.h"
-#include "World.h"
#include "OSSupport/GZipFile.h"
#include "WorldStorage/FastNBT.h"
#include "Blocks/BlockHandler.h"
@@ -266,7 +265,7 @@ void cBlockArea::SetOrigin(int a_OriginX, int a_OriginY, int a_OriginZ)
-bool cBlockArea::Read(cWorld * a_World, int a_MinBlockX, int a_MaxBlockX, int a_MinBlockY, int a_MaxBlockY, int a_MinBlockZ, int a_MaxBlockZ, int a_DataTypes)
+bool cBlockArea::Read(cForEachChunkProvider * a_ForEachChunkProvider, int a_MinBlockX, int a_MaxBlockX, int a_MinBlockY, int a_MaxBlockY, int a_MinBlockZ, int a_MaxBlockZ, int a_DataTypes)
{
// Normalize the coords:
if (a_MinBlockX > a_MaxBlockX)
@@ -327,7 +326,7 @@ bool cBlockArea::Read(cWorld * a_World, int a_MinBlockX, int a_MaxBlockX, int a_
cChunkDef::AbsoluteToRelative(a_MaxBlockX, a_MaxBlockY, a_MaxBlockZ, MaxChunkX, MaxChunkZ);
// Query block data:
- if (!a_World->ForEachChunkInRect(MinChunkX, MaxChunkX, MinChunkZ, MaxChunkZ, Reader))
+ if (!a_ForEachChunkProvider->ForEachChunkInRect(MinChunkX, MaxChunkX, MinChunkZ, MaxChunkZ, Reader))
{
Clear();
return false;
@@ -340,7 +339,7 @@ bool cBlockArea::Read(cWorld * a_World, int a_MinBlockX, int a_MaxBlockX, int a_
-bool cBlockArea::Write(cWorld * a_World, int a_MinBlockX, int a_MinBlockY, int a_MinBlockZ, int a_DataTypes)
+bool cBlockArea::Write(cForEachChunkProvider * a_ForEachChunkProvider, int a_MinBlockX, int a_MinBlockY, int a_MinBlockZ, int a_DataTypes)
{
ASSERT((a_DataTypes & GetDataTypes()) == a_DataTypes); // Are you requesting only the data that I have?
a_DataTypes = a_DataTypes & GetDataTypes(); // For release builds, silently cut off the datatypes that I don't have
@@ -357,7 +356,7 @@ bool cBlockArea::Write(cWorld * a_World, int a_MinBlockX, int a_MinBlockY, int a
a_MinBlockY = cChunkDef::Height - m_SizeY;
}
- return a_World->WriteBlockArea(*this, a_MinBlockX, a_MinBlockY, a_MinBlockZ, a_DataTypes);
+ return a_ForEachChunkProvider->WriteBlockArea(*this, a_MinBlockX, a_MinBlockY, a_MinBlockZ, a_DataTypes);
}