summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-11-11 16:06:31 +0100
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-11-11 16:06:31 +0100
commit934d3fe56549a3dce33bc565d27970dc29b88404 (patch)
tree67d872e1a096f88d1e97e733f6068eca2d2253bb /source
parentSettings.ini is read only once on server start (diff)
downloadcuberite-934d3fe56549a3dce33bc565d27970dc29b88404.tar
cuberite-934d3fe56549a3dce33bc565d27970dc29b88404.tar.gz
cuberite-934d3fe56549a3dce33bc565d27970dc29b88404.tar.bz2
cuberite-934d3fe56549a3dce33bc565d27970dc29b88404.tar.lz
cuberite-934d3fe56549a3dce33bc565d27970dc29b88404.tar.xz
cuberite-934d3fe56549a3dce33bc565d27970dc29b88404.tar.zst
cuberite-934d3fe56549a3dce33bc565d27970dc29b88404.zip
Diffstat (limited to 'source')
-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;