summaryrefslogtreecommitdiffstats
path: root/src/Bindings
diff options
context:
space:
mode:
authorLukas Pioch <lukas@zgow.de>2017-06-26 08:49:52 +0200
committerMattes D <github@xoft.cz>2017-06-26 08:49:52 +0200
commitbeda050341a0ca6be706f3515edc9fcc03899de3 (patch)
treef7f453abc77244978778b24645bceb6fd74face9 /src/Bindings
parentFix cBlockArea assertion and mis-indexing (#3810) (diff)
downloadcuberite-beda050341a0ca6be706f3515edc9fcc03899de3.tar
cuberite-beda050341a0ca6be706f3515edc9fcc03899de3.tar.gz
cuberite-beda050341a0ca6be706f3515edc9fcc03899de3.tar.bz2
cuberite-beda050341a0ca6be706f3515edc9fcc03899de3.tar.lz
cuberite-beda050341a0ca6be706f3515edc9fcc03899de3.tar.xz
cuberite-beda050341a0ca6be706f3515edc9fcc03899de3.tar.zst
cuberite-beda050341a0ca6be706f3515edc9fcc03899de3.zip
Diffstat (limited to 'src/Bindings')
-rw-r--r--src/Bindings/ManualBindings_BlockArea.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Bindings/ManualBindings_BlockArea.cpp b/src/Bindings/ManualBindings_BlockArea.cpp
index 14462c6e9..33fbdfdc2 100644
--- a/src/Bindings/ManualBindings_BlockArea.cpp
+++ b/src/Bindings/ManualBindings_BlockArea.cpp
@@ -590,6 +590,12 @@ static int tolua_cBlockArea_RelLine(lua_State * a_LuaState)
{
return cManualBindings::ApiParamError(a_LuaState, "Invalid baDataTypes combination (%d).", dataTypes);
}
+ if ((self->GetDataTypes() & dataTypes) != dataTypes)
+ {
+ return cManualBindings::ApiParamError(a_LuaState, "Requested datatypes not present in the cBlockArea. Got only 0x%02x, requested 0x%02x",
+ self->GetDataTypes(), dataTypes
+ );
+ }
// Draw the line:
self->RelLine(p1, p2, dataTypes, blockType, blockMeta, blockLight, blockSkyLight);