summaryrefslogtreecommitdiffstats
path: root/src/BlockArea.cpp
diff options
context:
space:
mode:
authorx12xx12x <44411062+12xx12@users.noreply.github.com>2022-04-20 00:10:35 +0200
committerAlexander Harkness <me@bearbin.net>2022-04-20 09:41:02 +0200
commitfe983a1a45b23c67cf6c758a4f0ffe6a8ba764d6 (patch)
treea5c9f00728af0f2ca841bb5d881b8d0d785b24ae /src/BlockArea.cpp
parentUpdated protocol functions to Vector3x (diff)
downloadcuberite-fe983a1a45b23c67cf6c758a4f0ffe6a8ba764d6.tar
cuberite-fe983a1a45b23c67cf6c758a4f0ffe6a8ba764d6.tar.gz
cuberite-fe983a1a45b23c67cf6c758a4f0ffe6a8ba764d6.tar.bz2
cuberite-fe983a1a45b23c67cf6c758a4f0ffe6a8ba764d6.tar.lz
cuberite-fe983a1a45b23c67cf6c758a4f0ffe6a8ba764d6.tar.xz
cuberite-fe983a1a45b23c67cf6c758a4f0ffe6a8ba764d6.tar.zst
cuberite-fe983a1a45b23c67cf6c758a4f0ffe6a8ba764d6.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 e9cd60242..65ada4682 100644
--- a/src/BlockArea.cpp
+++ b/src/BlockArea.cpp
@@ -445,8 +445,8 @@ bool cBlockArea::IsValidCoords(const Vector3i & a_Coords) const
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)
{
ASSERT(IsValidDataTypeCombination(a_DataTypes));
- ASSERT(cChunkDef::IsValidHeight(a_MinBlockY));
- ASSERT(cChunkDef::IsValidHeight(a_MaxBlockY));
+ ASSERT(cChunkDef::IsValidHeight({a_MinBlockX, a_MinBlockY, a_MinBlockZ}));
+ ASSERT(cChunkDef::IsValidHeight({a_MaxBlockX, a_MaxBlockY, a_MaxBlockZ}));
ASSERT(a_MinBlockX <= a_MaxBlockX);
ASSERT(a_MinBlockY <= a_MaxBlockY);
ASSERT(a_MinBlockZ <= a_MaxBlockZ);
@@ -518,8 +518,8 @@ bool cBlockArea::Read(cForEachChunkProvider & a_ForEachChunkProvider, const Vect
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?
- ASSERT(cChunkDef::IsValidHeight(a_MinBlockY));
- ASSERT(cChunkDef::IsValidHeight(a_MinBlockY + m_Size.y - 1));
+ ASSERT(cChunkDef::IsValidHeight({a_MinBlockX, a_MinBlockY, a_MinBlockZ}));
+ ASSERT(cChunkDef::IsValidHeight({a_MinBlockX, a_MinBlockY + m_Size.y - 1, a_MinBlockZ}));
return a_ForEachChunkProvider.WriteBlockArea(*this, a_MinBlockX, a_MinBlockY, a_MinBlockZ, a_DataTypes);
}