Cuberite
A lightweight, fast and extensible game server for Minecraft
Functions
ManualBindings_BlockArea.cpp File Reference
#include "Globals.h"
#include "tolua++/include/tolua++.h"
#include "../BlockArea.h"
#include "../World.h"
#include "ManualBindings.h"
#include "LuaState.h"
#include "PluginLua.h"
#include "../WorldStorage/SchematicFileSerializer.h"
Include dependency graph for ManualBindings_BlockArea.cpp:

Go to the source code of this file.

Functions

template<typename DataType , int DataTypeFlag, DataType(cBlockArea::*)(int, int, int) const Fn>
static int GetBlock (lua_State *a_LuaState)
 Templated bindings for the GetBlock___() functions. More...
 
template<typename DataType , int DataTypeFlag, DataType(cBlockArea::*)(int, int, int) const Fn>
static int GetRelBlock (lua_State *a_LuaState)
 Templated bindings for the GetRelBlock___() functions. More...
 
static int readCuboidOverloadParams (cLuaState &a_LuaState, int a_StartParam, cCuboid &a_Cuboid)
 Reads params that together form a Cuboid. More...
 
static int readVector3iOverloadParams (cLuaState &a_LuaState, int a_StartParam, Vector3i &a_Coords, const char *a_ParamName)
 Reads params that together form a Vector3i. More...
 
template<typename DataType , int DataTypeFlag, void(cBlockArea::*)(int, int, int, DataType) Fn>
static int SetBlock (lua_State *a_LuaState)
 Templated bindings for the SetBlock___() functions. More...
 
template<typename DataType , int DataTypeFlag, void(cBlockArea::*)(int, int, int, DataType) Fn>
static int SetRelBlock (lua_State *a_LuaState)
 Templated bindings for the SetRelBlock___() functions. More...
 
static int tolua_cBlockArea_Create (lua_State *a_LuaState)
 Binding for the cBlockArea::Create() functions. More...
 
static int tolua_cBlockArea_FillRelCuboid (lua_State *a_LuaState)
 Bindings for the cBlockArea:FillRelCuboid() functions. More...
 
static int tolua_cBlockArea_GetBlockTypeMeta (lua_State *a_LuaState)
 
static int tolua_cBlockArea_GetCoordRange (lua_State *a_LuaState)
 
static int tolua_cBlockArea_GetNonAirCropRelCoords (lua_State *a_LuaState)
 
static int tolua_cBlockArea_GetOrigin (lua_State *a_LuaState)
 
static int tolua_cBlockArea_GetRelBlockTypeMeta (lua_State *a_LuaState)
 
static int tolua_cBlockArea_GetSize (lua_State *a_LuaState)
 
static int tolua_cBlockArea_LoadFromSchematicFile (lua_State *a_LuaState)
 
static int tolua_cBlockArea_LoadFromSchematicString (lua_State *a_LuaState)
 
static int tolua_cBlockArea_Read (lua_State *a_LuaState)
 Bindings for the cBlockArea:Read() functions. More...
 
static int tolua_cBlockArea_RelLine (lua_State *a_LuaState)
 Bindings for the cBlockArea:RelLine() functions. More...
 
static int tolua_cBlockArea_SaveToSchematicFile (lua_State *a_LuaState)
 
static int tolua_cBlockArea_SaveToSchematicString (lua_State *a_LuaState)
 
static int tolua_cBlockArea_SetBlockTypeMeta (lua_State *a_LuaState)
 
static int tolua_cBlockArea_SetRelBlockTypeMeta (lua_State *a_LuaState)
 
static int tolua_cBlockArea_Write (lua_State *a_LuaState)
 Bindings for the cBlockArea:Write() functions. More...
 

Function Documentation

template<typename DataType , int DataTypeFlag, DataType(cBlockArea::*)(int, int, int) const Fn>
static int GetBlock ( lua_State *  a_LuaState)
static

Templated bindings for the GetBlock___() functions.

DataType is either BLOCKTYPE or NIBBLETYPE. DataTypeFlag is the ba___ constant used for the datatype being queried. Fn is the getter function. Also supports the Vector3i overloads (TODO: document these (?)).

Definition at line 762 of file ManualBindings_BlockArea.cpp.

template<typename DataType , int DataTypeFlag, DataType(cBlockArea::*)(int, int, int) const Fn>
static int GetRelBlock ( lua_State *  a_LuaState)
static

Templated bindings for the GetRelBlock___() functions.

DataType is either BLOCKTYPE or NIBBLETYPE. DataTypeFlag is the ba___ constant used for the datatype being queried. Fn is the getter function. Also supports the Vector3i overloads (TODO: document these (?)).

Definition at line 813 of file ManualBindings_BlockArea.cpp.

static int readCuboidOverloadParams ( cLuaState a_LuaState,
int  a_StartParam,
cCuboid a_Cuboid 
)
static

Reads params that together form a Cuboid.

These can be:

  • 6 numbers (MinX, MaxX, MinY, MaxY, MinZ, MaxZ)
  • 2 Vector3-s (Min, Max)
  • cCuboid Returns the index of the first parameter following the Cuboid spec. Raises an Api error if the params don't specify a Cuboid.

Definition at line 26 of file ManualBindings_BlockArea.cpp.

static int readVector3iOverloadParams ( cLuaState a_LuaState,
int  a_StartParam,
Vector3i a_Coords,
const char *  a_ParamName 
)
static

Reads params that together form a Vector3i.

These can be:

  • 3 numbers (x, y, z)
  • Vector3i Returns the index of the first parameter following the Vector3i spec. Raises an Api error if the params don't specify a Vector3i.

Definition at line 74 of file ManualBindings_BlockArea.cpp.

template<typename DataType , int DataTypeFlag, void(cBlockArea::*)(int, int, int, DataType) Fn>
static int SetBlock ( lua_State *  a_LuaState)
static

Templated bindings for the SetBlock___() functions.

DataType is either BLOCKTYPE or NIBBLETYPE. DataTypeFlag is the ba___ constant used for the datatypebeing manipulated. Fn is the setter function. Also supports the Vector3i overloads (TODO: document these (?)).

Definition at line 864 of file ManualBindings_BlockArea.cpp.

template<typename DataType , int DataTypeFlag, void(cBlockArea::*)(int, int, int, DataType) Fn>
static int SetRelBlock ( lua_State *  a_LuaState)
static

Templated bindings for the SetRelBlock___() functions.

DataType is either BLOCKTYPE or NIBBLETYPE. DataTypeFlag is the ba___ constant used for the datatypebeing manipulated. Fn is the setter function. Also supports the Vector3i overloads (TODO: document these (?)).

Definition at line 917 of file ManualBindings_BlockArea.cpp.

static int tolua_cBlockArea_Create ( lua_State *  a_LuaState)
static

Binding for the cBlockArea::Create() functions.

Supports two overloads and one default parameter.

Definition at line 103 of file ManualBindings_BlockArea.cpp.

static int tolua_cBlockArea_FillRelCuboid ( lua_State *  a_LuaState)
static

Bindings for the cBlockArea:FillRelCuboid() functions.

Supports coord overloads and one default parameter.

Definition at line 144 of file ManualBindings_BlockArea.cpp.

static int tolua_cBlockArea_GetBlockTypeMeta ( lua_State *  a_LuaState)
static

Definition at line 195 of file ManualBindings_BlockArea.cpp.

static int tolua_cBlockArea_GetCoordRange ( lua_State *  a_LuaState)
static

Definition at line 234 of file ManualBindings_BlockArea.cpp.

static int tolua_cBlockArea_GetNonAirCropRelCoords ( lua_State *  a_LuaState)
static

Definition at line 265 of file ManualBindings_BlockArea.cpp.

static int tolua_cBlockArea_GetOrigin ( lua_State *  a_LuaState)
static

Definition at line 304 of file ManualBindings_BlockArea.cpp.

static int tolua_cBlockArea_GetRelBlockTypeMeta ( lua_State *  a_LuaState)
static

Definition at line 336 of file ManualBindings_BlockArea.cpp.

static int tolua_cBlockArea_GetSize ( lua_State *  a_LuaState)
static

Definition at line 384 of file ManualBindings_BlockArea.cpp.

static int tolua_cBlockArea_LoadFromSchematicFile ( lua_State *  a_LuaState)
static

Definition at line 415 of file ManualBindings_BlockArea.cpp.

static int tolua_cBlockArea_LoadFromSchematicString ( lua_State *  a_LuaState)
static

Definition at line 447 of file ManualBindings_BlockArea.cpp.

static int tolua_cBlockArea_Read ( lua_State *  a_LuaState)
static

Bindings for the cBlockArea:Read() functions.

Supports three overloads and one default parameter.

Definition at line 480 of file ManualBindings_BlockArea.cpp.

static int tolua_cBlockArea_RelLine ( lua_State *  a_LuaState)
static

Bindings for the cBlockArea:RelLine() functions.

Supports two overloads and one default parameter. Also supports "bastard overloads" (Vector3i, x, y, z), but we don't advertise those.

Definition at line 560 of file ManualBindings_BlockArea.cpp.

static int tolua_cBlockArea_SaveToSchematicFile ( lua_State *  a_LuaState)
static

Definition at line 605 of file ManualBindings_BlockArea.cpp.

static int tolua_cBlockArea_SaveToSchematicString ( lua_State *  a_LuaState)
static

Definition at line 637 of file ManualBindings_BlockArea.cpp.

static int tolua_cBlockArea_SetBlockTypeMeta ( lua_State *  a_LuaState)
static

Definition at line 960 of file ManualBindings_BlockArea.cpp.

static int tolua_cBlockArea_SetRelBlockTypeMeta ( lua_State *  a_LuaState)
static

Definition at line 1008 of file ManualBindings_BlockArea.cpp.

static int tolua_cBlockArea_Write ( lua_State *  a_LuaState)
static

Bindings for the cBlockArea:Write() functions.

Supports two overloads and one default parameter.

Definition at line 673 of file ManualBindings_BlockArea.cpp.