summaryrefslogtreecommitdiffstats
path: root/src/BlockArea.cpp
diff options
context:
space:
mode:
authorTycho Bickerstaff <work.tycho@gmail.com>2013-12-22 14:19:27 +0100
committerTycho Bickerstaff <work.tycho@gmail.com>2013-12-22 14:19:27 +0100
commit94ca07cfbfe0016d70963c055c87fe14f8622a4d (patch)
tree28dc91dc948287f802d9628a2ea715e1d4e0be49 /src/BlockArea.cpp
parentChunk is now warnings clean (diff)
parentUpdate GETTING-STARTED.md (diff)
downloadcuberite-94ca07cfbfe0016d70963c055c87fe14f8622a4d.tar
cuberite-94ca07cfbfe0016d70963c055c87fe14f8622a4d.tar.gz
cuberite-94ca07cfbfe0016d70963c055c87fe14f8622a4d.tar.bz2
cuberite-94ca07cfbfe0016d70963c055c87fe14f8622a4d.tar.lz
cuberite-94ca07cfbfe0016d70963c055c87fe14f8622a4d.tar.xz
cuberite-94ca07cfbfe0016d70963c055c87fe14f8622a4d.tar.zst
cuberite-94ca07cfbfe0016d70963c055c87fe14f8622a4d.zip
Diffstat (limited to '')
-rw-r--r--src/BlockArea.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/BlockArea.cpp b/src/BlockArea.cpp
index a5309f995..1148908c6 100644
--- a/src/BlockArea.cpp
+++ b/src/BlockArea.cpp
@@ -301,10 +301,10 @@ bool cBlockArea::Read(cWorld * a_World, int a_MinBlockX, int a_MaxBlockX, int a_
LOGWARNING("%s: MaxBlockY less than zero, adjusting to zero", __FUNCTION__);
a_MaxBlockY = 0;
}
- else if (a_MaxBlockY >= cChunkDef::Height)
+ else if (a_MaxBlockY > cChunkDef::Height)
{
LOGWARNING("%s: MaxBlockY more than chunk height, adjusting to chunk height", __FUNCTION__);
- a_MaxBlockY = cChunkDef::Height - 1;
+ a_MaxBlockY = cChunkDef::Height;
}
// Allocate the needed memory:
@@ -349,10 +349,10 @@ bool cBlockArea::Write(cWorld * a_World, int a_MinBlockX, int a_MinBlockY, int a
LOGWARNING("%s: MinBlockY less than zero, adjusting to zero", __FUNCTION__);
a_MinBlockY = 0;
}
- else if (a_MinBlockY >= cChunkDef::Height - m_SizeY)
+ else if (a_MinBlockY > cChunkDef::Height - m_SizeY)
{
LOGWARNING("%s: MinBlockY + m_SizeY more than chunk height, adjusting to chunk height", __FUNCTION__);
- a_MinBlockY = cChunkDef::Height - m_SizeY - 1;
+ a_MinBlockY = cChunkDef::Height - m_SizeY;
}
return a_World->WriteBlockArea(*this, a_MinBlockX, a_MinBlockY, a_MinBlockZ, a_DataTypes);