summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--source/Chunk.cpp12
-rw-r--r--source/Chunk.h3
-rw-r--r--source/ChunkMap.cpp16
-rw-r--r--source/ChunkMap.h5
-rw-r--r--source/World.cpp9
-rw-r--r--source/World.h3
6 files changed, 1 insertions, 47 deletions
diff --git a/source/Chunk.cpp b/source/Chunk.cpp
index ab5cf3e91..f297e0bbd 100644
--- a/source/Chunk.cpp
+++ b/source/Chunk.cpp
@@ -293,18 +293,6 @@ void cChunk::GetBlockTypes(BLOCKTYPE * a_BlockTypes)
-void cChunk::GetBlockData(BLOCKTYPE * a_BlockData)
-{
- memcpy(a_BlockData, m_BlockTypes, NumBlocks);
- memcpy(a_BlockData + MetaOffset, m_BlockMeta, NumBlocks / 2);
- memcpy(a_BlockData + LightOffset, m_BlockLight, NumBlocks / 2);
- memcpy(a_BlockData + SkyLightOffset, m_BlockSkyLight, NumBlocks / 2);
-}
-
-
-
-
-
void cChunk::WriteBlockArea(cBlockArea & a_Area, int a_MinBlockX, int a_MinBlockY, int a_MinBlockZ, int a_DataTypes)
{
if ((a_DataTypes & (cBlockArea::baTypes | cBlockArea::baMetas)) != (cBlockArea::baTypes | cBlockArea::baMetas))
diff --git a/source/Chunk.h b/source/Chunk.h
index e21868123..eaa4f82b8 100644
--- a/source/Chunk.h
+++ b/source/Chunk.h
@@ -106,9 +106,6 @@ public:
/// Copies m_BlockData into a_BlockTypes, only the block types
void GetBlockTypes(BLOCKTYPE * a_BlockTypes);
- /// Copies entire block data into a_BlockData, the entire 4 arrays (Type, Meta, Light, SkyLight)
- void GetBlockData(BLOCKTYPE * a_BlockData);
-
/// Writes the specified cBlockArea at the coords specified. Note that the coords may extend beyond the chunk!
void WriteBlockArea(cBlockArea & a_Area, int a_MinBlockX, int a_MinBlockY, int a_MinBlockZ, int a_DataTypes);
diff --git a/source/ChunkMap.cpp b/source/ChunkMap.cpp
index bad47b066..9c93f3e08 100644
--- a/source/ChunkMap.cpp
+++ b/source/ChunkMap.cpp
@@ -720,22 +720,6 @@ bool cChunkMap::GetChunkBlockTypes(int a_ChunkX, int a_ChunkY, int a_ChunkZ, BLO
-bool cChunkMap::GetChunkBlockData(int a_ChunkX, int a_ChunkY, int a_ChunkZ, BLOCKTYPE * a_BlockData)
-{
- cCSLock Lock(m_CSLayers);
- cChunkPtr Chunk = GetChunkNoGen(a_ChunkX, a_ChunkY, a_ChunkZ);
- if ((Chunk == NULL) || !Chunk->IsValid())
- {
- return false;
- }
- Chunk->GetBlockData(a_BlockData);
- return true;
-}
-
-
-
-
-
bool cChunkMap::IsChunkValid(int a_ChunkX, int a_ChunkY, int a_ChunkZ)
{
cCSLock Lock(m_CSLayers);
diff --git a/source/ChunkMap.h b/source/ChunkMap.h
index 15e786604..38d16d0c4 100644
--- a/source/ChunkMap.h
+++ b/source/ChunkMap.h
@@ -126,12 +126,9 @@ public:
bool GetChunkData (int a_ChunkX, int a_ChunkY, int a_ChunkZ, cChunkDataCallback & a_Callback);
- /// Gets the chunk's blocks, only the block types
+ /// Copies the chunk's blocktypes into a_Blocks; returns true if successful
bool GetChunkBlockTypes (int a_ChunkX, int a_ChunkY, int a_ChunkZ, BLOCKTYPE * a_Blocks);
- /// Gets the chunk's block data, the entire 4 arrays (Types, Meta, Light, SkyLight)
- bool GetChunkBlockData (int a_ChunkX, int a_ChunkY, int a_ChunkZ, BLOCKTYPE * a_BlockData);
-
bool IsChunkValid (int a_ChunkX, int a_ChunkY, int a_ChunkZ);
bool HasChunkAnyClients (int a_ChunkX, int a_ChunkY, int a_ChunkZ);
int GetHeight (int a_BlockX, int a_BlockZ);
diff --git a/source/World.cpp b/source/World.cpp
index 29c4f7b5f..210fe30a0 100644
--- a/source/World.cpp
+++ b/source/World.cpp
@@ -1631,15 +1631,6 @@ bool cWorld::GetChunkBlockTypes(int a_ChunkX, int a_ChunkY, int a_ChunkZ, BLOCKT
-bool cWorld::GetChunkBlockData(int a_ChunkX, int a_ChunkY, int a_ChunkZ, BLOCKTYPE * a_BlockData)
-{
- return m_ChunkMap->GetChunkBlockData(a_ChunkX, a_ChunkY, a_ChunkZ, a_BlockData);
-}
-
-
-
-
-
bool cWorld::IsChunkValid(int a_ChunkX, int a_ChunkY, int a_ChunkZ) const
{
return m_ChunkMap->IsChunkValid(a_ChunkX, a_ChunkY, a_ChunkZ);
diff --git a/source/World.h b/source/World.h
index 3b5f45276..9b6b16f59 100644
--- a/source/World.h
+++ b/source/World.h
@@ -161,9 +161,6 @@ public:
/// Gets the chunk's blocks, only the block types
bool GetChunkBlockTypes(int a_ChunkX, int a_ChunkY, int a_ChunkZ, BLOCKTYPE * a_BlockTypes);
- /// Gets the chunk's blockdata, the entire 4 arrays (Types, Meta, Light, SkyLight)
- bool GetChunkBlockData (int a_ChunkX, int a_ChunkY, int a_ChunkZ, BLOCKTYPE * a_BlockData);
-
bool IsChunkValid (int a_ChunkX, int a_ChunkY, int a_ChunkZ) const;
bool HasChunkAnyClients(int a_ChunkX, int a_ChunkY, int a_ChunkZ) const;