2017-01-15 09:11:18 -05:00
|
|
|
|
|
|
|
// Stubs.cpp
|
|
|
|
|
|
|
|
// Implements stubs of various Cuberite methods that are needed for linking but not for runtime
|
|
|
|
// This is required so that we don't bring in the entire Cuberite via dependencies
|
|
|
|
|
|
|
|
#include "Globals.h"
|
|
|
|
#include "BlockInfo.h"
|
|
|
|
#include "Bindings.h"
|
2017-08-25 08:43:18 -04:00
|
|
|
#include "DeadlockDetect.h"
|
|
|
|
#include "UUID.h"
|
2017-01-15 09:11:18 -05:00
|
|
|
#include "Bindings/DeprecatedBindings.h"
|
|
|
|
#include "Bindings/LuaJson.h"
|
|
|
|
#include "Bindings/ManualBindings.h"
|
|
|
|
#include "BlockEntities/BlockEntity.h"
|
|
|
|
#include "Blocks/BlockHandler.h"
|
|
|
|
#include "Generating/ChunkDesc.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// fwd:
|
|
|
|
struct lua_State;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Prototypes, needed by clang:
|
|
|
|
extern "C" int luaopen_lsqlite3(lua_State * a_LuaState);
|
|
|
|
extern "C" int luaopen_lxp(lua_State * a_LuaState);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void cManualBindings::Bind(lua_State * a_LuaState)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void DeprecatedBindings::Bind(lua_State * a_LuaState)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void cLuaJson::Bind(cLuaState & a_LuaState)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int tolua_AllToLua_open(lua_State * a_LuaState)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
extern "C" int luaopen_lsqlite3(lua_State * a_LuaState)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
extern "C" int luaopen_lxp(lua_State * a_LuaState)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-09-17 09:51:42 -04:00
|
|
|
cBlockInfo::cBlockInfo()
|
2017-01-15 09:11:18 -05:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-09-17 09:51:42 -04:00
|
|
|
cBlockInfo::cBlockInfoArray::cBlockInfoArray()
|
2020-04-03 02:57:01 -04:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-09-17 09:51:42 -04:00
|
|
|
cBlockHandler * cBlockInfo::GetHandler(BLOCKTYPE a_Type)
|
2017-01-15 09:11:18 -05:00
|
|
|
{
|
2020-09-17 09:51:42 -04:00
|
|
|
return nullptr;
|
2017-01-15 09:11:18 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-07-28 12:59:21 -04:00
|
|
|
cBoundingBox::cBoundingBox(double, double, double, double, double, double)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-01-15 09:11:18 -05:00
|
|
|
cBlockHandler::cBlockHandler(BLOCKTYPE a_BlockType)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-07-28 12:59:21 -04:00
|
|
|
cBoundingBox cBlockHandler::GetPlacementCollisionBox(BLOCKTYPE a_XM, BLOCKTYPE a_XP, BLOCKTYPE a_YM, BLOCKTYPE a_YP, BLOCKTYPE a_ZM, BLOCKTYPE a_ZP)
|
|
|
|
{
|
|
|
|
return cBoundingBox(0, 0, 0, 0, 0, 0);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-01-15 09:11:18 -05:00
|
|
|
bool cBlockHandler::GetPlacementBlockTypeMeta(
|
2017-07-31 16:17:52 -04:00
|
|
|
cChunkInterface & a_ChunkInterface, cPlayer & a_Player,
|
2020-04-21 16:19:22 -04:00
|
|
|
const Vector3i a_BlockPos,
|
|
|
|
eBlockFace a_BlockFace,
|
|
|
|
const Vector3i a_CursorPos,
|
2017-01-15 09:11:18 -05:00
|
|
|
BLOCKTYPE & a_BlockType, NIBBLETYPE & a_BlockMeta
|
|
|
|
)
|
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-04-17 05:36:37 -04:00
|
|
|
void cBlockHandler::OnUpdate(cChunkInterface & a_ChunkInterface, cWorldInterface & a_WorldInterface, cBlockPluginInterface & a_PluginInterface, cChunk & a_Chunk, const Vector3i a_RelPos)
|
2017-01-15 09:11:18 -05:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-08-04 13:39:47 -04:00
|
|
|
void cBlockHandler::OnNeighborChanged(cChunkInterface & a_ChunkInterface, Vector3i a_BlockPos, eBlockFace a_WhichNeighbor)
|
2017-01-15 09:11:18 -05:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-10-16 04:06:34 -04:00
|
|
|
void cBlockHandler::NeighborChanged(cChunkInterface & a_ChunkInterface, Vector3i a_BlockPos, eBlockFace a_WhichNeighbor)
|
2017-01-15 09:11:18 -05:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-10-16 04:06:34 -04:00
|
|
|
cItems cBlockHandler::ConvertToPickups(NIBBLETYPE a_BlockMeta, cBlockEntity * a_BlockEntity, const cEntity * a_Digger, const cItem * a_Tool)
|
2017-01-15 09:11:18 -05:00
|
|
|
{
|
2019-10-16 04:06:34 -04:00
|
|
|
return cItems();
|
2017-01-15 09:11:18 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-04-21 16:19:22 -04:00
|
|
|
bool cBlockHandler::CanBeAt(cChunkInterface & a_ChunkInterface, const Vector3i a_RelPos, const cChunk & a_Chunk)
|
2017-01-15 09:11:18 -05:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool cBlockHandler::IsUseable()
|
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool cBlockHandler::IsClickedThrough(void)
|
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-07-07 10:37:53 -04:00
|
|
|
bool cBlockHandler::DoesIgnoreBuildCollision(cChunkInterface & a_ChunkInterface, Vector3i a_Pos, cPlayer & a_Player, NIBBLETYPE a_Meta)
|
2017-01-15 09:11:18 -05:00
|
|
|
{
|
|
|
|
return (m_BlockType == E_BLOCK_AIR);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool cBlockHandler::DoesDropOnUnsuitable(void)
|
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-10-16 04:06:34 -04:00
|
|
|
void cBlockHandler::Check(cChunkInterface & a_ChunkInterface, cBlockPluginInterface & a_PluginInterface, Vector3i a_RelPos, cChunk & a_Chunk)
|
2017-01-15 09:11:18 -05:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ColourID cBlockHandler::GetMapBaseColourID(NIBBLETYPE a_Meta)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-04-21 16:19:22 -04:00
|
|
|
bool cBlockHandler::IsInsideBlock(Vector3d a_Position, const NIBBLETYPE a_BlockMeta)
|
2017-01-15 09:11:18 -05:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-04-03 17:23:38 -04:00
|
|
|
OwnedBlockEntity cBlockEntity::CreateByBlockType(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, Vector3i a_Pos, cWorld * a_World)
|
2017-01-15 09:11:18 -05:00
|
|
|
{
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-01-17 16:38:04 -05:00
|
|
|
|
|
|
|
void cDeadlockDetect::TrackCriticalSection(cCriticalSection & a_CS, const AString & a_Name)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void cDeadlockDetect::UntrackCriticalSection(cCriticalSection & a_CS)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-06-24 05:58:06 -04:00
|
|
|
|
2019-09-29 08:59:24 -04:00
|
|
|
void cBlockEntity::SetPos(Vector3i a_NewPos)
|
2017-06-24 05:58:06 -04:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool cBlockEntity::IsBlockEntityBlockType(BLOCKTYPE a_BlockType)
|
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-04-03 17:23:38 -04:00
|
|
|
OwnedBlockEntity cBlockEntity::Clone(Vector3i a_Pos)
|
2017-06-24 05:58:06 -04:00
|
|
|
{
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-08-25 08:43:18 -04:00
|
|
|
|
|
|
|
bool cLuaState::GetStackValue(int, cUUID *&)
|
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool cUUID::FromString(const AString &)
|
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|