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<class SELF , class ITEM , bool(SELF::*)(int, int, int, cFunctionRef< bool(ITEM &)>) DoWithFn, bool(SELF::*)(int, int, int) const CoordCheckFn>
static int DoWithXYZ (lua_State *tolua_S)
 Template for the bindings for the DoWithXYZAt(X, Y, Z) functions that need to check their coords. More...
 
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

◆ DoWithXYZ()

template<class SELF , class ITEM , bool(SELF::*)(int, int, int, cFunctionRef< bool(ITEM &)>) DoWithFn, bool(SELF::*)(int, int, int) const CoordCheckFn>
static int DoWithXYZ ( lua_State *  tolua_S)
static

Template for the bindings for the DoWithXYZAt(X, Y, Z) functions that need to check their coords.

Definition at line 25 of file ManualBindings_BlockArea.cpp.

◆ GetBlock()

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 830 of file ManualBindings_BlockArea.cpp.

◆ GetRelBlock()

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 881 of file ManualBindings_BlockArea.cpp.

◆ readCuboidOverloadParams()

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 86 of file ManualBindings_BlockArea.cpp.

◆ readVector3iOverloadParams()

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 130 of file ManualBindings_BlockArea.cpp.

◆ SetBlock()

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 932 of file ManualBindings_BlockArea.cpp.

◆ SetRelBlock()

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 985 of file ManualBindings_BlockArea.cpp.

◆ tolua_cBlockArea_Create()

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 157 of file ManualBindings_BlockArea.cpp.

◆ tolua_cBlockArea_FillRelCuboid()

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 198 of file ManualBindings_BlockArea.cpp.

◆ tolua_cBlockArea_GetBlockTypeMeta()

static int tolua_cBlockArea_GetBlockTypeMeta ( lua_State *  a_LuaState)
static

Definition at line 254 of file ManualBindings_BlockArea.cpp.

◆ tolua_cBlockArea_GetCoordRange()

static int tolua_cBlockArea_GetCoordRange ( lua_State *  a_LuaState)
static

Definition at line 293 of file ManualBindings_BlockArea.cpp.

◆ tolua_cBlockArea_GetNonAirCropRelCoords()

static int tolua_cBlockArea_GetNonAirCropRelCoords ( lua_State *  a_LuaState)
static

Definition at line 324 of file ManualBindings_BlockArea.cpp.

◆ tolua_cBlockArea_GetOrigin()

static int tolua_cBlockArea_GetOrigin ( lua_State *  a_LuaState)
static

Definition at line 363 of file ManualBindings_BlockArea.cpp.

◆ tolua_cBlockArea_GetRelBlockTypeMeta()

static int tolua_cBlockArea_GetRelBlockTypeMeta ( lua_State *  a_LuaState)
static

Definition at line 395 of file ManualBindings_BlockArea.cpp.

◆ tolua_cBlockArea_GetSize()

static int tolua_cBlockArea_GetSize ( lua_State *  a_LuaState)
static

Definition at line 443 of file ManualBindings_BlockArea.cpp.

◆ tolua_cBlockArea_LoadFromSchematicFile()

static int tolua_cBlockArea_LoadFromSchematicFile ( lua_State *  a_LuaState)
static

Definition at line 474 of file ManualBindings_BlockArea.cpp.

◆ tolua_cBlockArea_LoadFromSchematicString()

static int tolua_cBlockArea_LoadFromSchematicString ( lua_State *  a_LuaState)
static

Definition at line 516 of file ManualBindings_BlockArea.cpp.

◆ tolua_cBlockArea_Read()

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 559 of file ManualBindings_BlockArea.cpp.

◆ tolua_cBlockArea_RelLine()

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 612 of file ManualBindings_BlockArea.cpp.

◆ tolua_cBlockArea_SaveToSchematicFile()

static int tolua_cBlockArea_SaveToSchematicFile ( lua_State *  a_LuaState)
static

Definition at line 658 of file ManualBindings_BlockArea.cpp.

◆ tolua_cBlockArea_SaveToSchematicString()

static int tolua_cBlockArea_SaveToSchematicString ( lua_State *  a_LuaState)
static

Definition at line 700 of file ManualBindings_BlockArea.cpp.

◆ tolua_cBlockArea_SetBlockTypeMeta()

static int tolua_cBlockArea_SetBlockTypeMeta ( lua_State *  a_LuaState)
static

Definition at line 1029 of file ManualBindings_BlockArea.cpp.

◆ tolua_cBlockArea_SetRelBlockTypeMeta()

static int tolua_cBlockArea_SetRelBlockTypeMeta ( lua_State *  a_LuaState)
static

Definition at line 1077 of file ManualBindings_BlockArea.cpp.

◆ tolua_cBlockArea_Write()

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 740 of file ManualBindings_BlockArea.cpp.