summaryrefslogtreecommitdiffstats
path: root/src/Bindings/ManualBindings_BlockArea.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Bindings/ManualBindings_BlockArea.cpp')
-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);