diff options
author | Tiger Wang <ziwei.tiger@outlook.com> | 2020-09-20 15:50:52 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-20 15:50:52 +0200 |
commit | 68cced73afe546328cf94ed07c57deee47bfadec (patch) | |
tree | 88be88e3fd4a208b9849e526f1877caa44058ab5 /tests/LuaThreadStress | |
parent | Added armor and shulker box cleaning (#4875) (diff) | |
download | cuberite-68cced73afe546328cf94ed07c57deee47bfadec.tar cuberite-68cced73afe546328cf94ed07c57deee47bfadec.tar.gz cuberite-68cced73afe546328cf94ed07c57deee47bfadec.tar.bz2 cuberite-68cced73afe546328cf94ed07c57deee47bfadec.tar.lz cuberite-68cced73afe546328cf94ed07c57deee47bfadec.tar.xz cuberite-68cced73afe546328cf94ed07c57deee47bfadec.tar.zst cuberite-68cced73afe546328cf94ed07c57deee47bfadec.zip |
Diffstat (limited to 'tests/LuaThreadStress')
-rw-r--r-- | tests/LuaThreadStress/Stubs.cpp | 54 |
1 files changed, 24 insertions, 30 deletions
diff --git a/tests/LuaThreadStress/Stubs.cpp b/tests/LuaThreadStress/Stubs.cpp index f921477b7..819c6b7ae 100644 --- a/tests/LuaThreadStress/Stubs.cpp +++ b/tests/LuaThreadStress/Stubs.cpp @@ -102,15 +102,6 @@ cBlockInfo::cBlockInfoArray::cBlockInfoArray() -cBlockHandler * cBlockInfo::GetHandler(BLOCKTYPE a_Type) -{ - return nullptr; -} - - - - - cBoundingBox::cBoundingBox(double, double, double, double, double, double) { } @@ -119,15 +110,7 @@ cBoundingBox::cBoundingBox(double, double, double, double, double, double) -cBlockHandler::cBlockHandler(BLOCKTYPE a_BlockType) -{ -} - - - - - -cBoundingBox cBlockHandler::GetPlacementCollisionBox(BLOCKTYPE a_XM, BLOCKTYPE a_XP, BLOCKTYPE a_YM, BLOCKTYPE a_YP, BLOCKTYPE a_ZM, BLOCKTYPE a_ZP) +cBoundingBox cBlockHandler::GetPlacementCollisionBox(BLOCKTYPE a_XM, BLOCKTYPE a_XP, BLOCKTYPE a_YM, BLOCKTYPE a_YP, BLOCKTYPE a_ZM, BLOCKTYPE a_ZP) const { return cBoundingBox(0, 0, 0, 0, 0, 0); } @@ -142,7 +125,7 @@ bool cBlockHandler::GetPlacementBlockTypeMeta( eBlockFace a_BlockFace, const Vector3i a_CursorPos, BLOCKTYPE & a_BlockType, NIBBLETYPE & a_BlockMeta -) +) const { return true; } @@ -151,7 +134,7 @@ bool cBlockHandler::GetPlacementBlockTypeMeta( -void cBlockHandler::OnUpdate(cChunkInterface & a_ChunkInterface, cWorldInterface & a_WorldInterface, cBlockPluginInterface & a_PluginInterface, cChunk & a_Chunk, const Vector3i a_RelPos) +void cBlockHandler::OnUpdate(cChunkInterface & a_ChunkInterface, cWorldInterface & a_WorldInterface, cBlockPluginInterface & a_PluginInterface, cChunk & a_Chunk, const Vector3i a_RelPos) const { } @@ -159,7 +142,7 @@ void cBlockHandler::OnUpdate(cChunkInterface & a_ChunkInterface, cWorldInterface -void cBlockHandler::OnNeighborChanged(cChunkInterface & a_ChunkInterface, Vector3i a_BlockPos, eBlockFace a_WhichNeighbor) +void cBlockHandler::OnNeighborChanged(cChunkInterface & a_ChunkInterface, Vector3i a_BlockPos, eBlockFace a_WhichNeighbor) const { } @@ -175,7 +158,7 @@ void cBlockHandler::NeighborChanged(cChunkInterface & a_ChunkInterface, Vector3i -cItems cBlockHandler::ConvertToPickups(NIBBLETYPE a_BlockMeta, cBlockEntity * a_BlockEntity, const cEntity * a_Digger, const cItem * a_Tool) +cItems cBlockHandler::ConvertToPickups(NIBBLETYPE a_BlockMeta, cBlockEntity * a_BlockEntity, const cEntity * a_Digger, const cItem * a_Tool) const { return cItems(); } @@ -184,7 +167,7 @@ cItems cBlockHandler::ConvertToPickups(NIBBLETYPE a_BlockMeta, cBlockEntity * a_ -bool cBlockHandler::CanBeAt(cChunkInterface & a_ChunkInterface, const Vector3i a_RelPos, const cChunk & a_Chunk) +bool cBlockHandler::CanBeAt(cChunkInterface & a_ChunkInterface, const Vector3i a_RelPos, const cChunk & a_Chunk) const { return true; } @@ -193,7 +176,7 @@ bool cBlockHandler::CanBeAt(cChunkInterface & a_ChunkInterface, const Vector3i a -bool cBlockHandler::IsUseable() +bool cBlockHandler::IsUseable() const { return false; } @@ -202,7 +185,7 @@ bool cBlockHandler::IsUseable() -bool cBlockHandler::IsClickedThrough(void) +bool cBlockHandler::IsClickedThrough(void) const { return false; } @@ -211,7 +194,7 @@ bool cBlockHandler::IsClickedThrough(void) -bool cBlockHandler::DoesIgnoreBuildCollision(cChunkInterface & a_ChunkInterface, Vector3i a_Pos, cPlayer & a_Player, NIBBLETYPE a_Meta) +bool cBlockHandler::DoesIgnoreBuildCollision(cChunkInterface & a_ChunkInterface, Vector3i a_Pos, cPlayer & a_Player, NIBBLETYPE a_Meta) const { return (m_BlockType == E_BLOCK_AIR); } @@ -220,7 +203,7 @@ bool cBlockHandler::DoesIgnoreBuildCollision(cChunkInterface & a_ChunkInterface, -bool cBlockHandler::DoesDropOnUnsuitable(void) +bool cBlockHandler::DoesDropOnUnsuitable(void) const { return true; } @@ -229,7 +212,7 @@ bool cBlockHandler::DoesDropOnUnsuitable(void) -void cBlockHandler::Check(cChunkInterface & a_ChunkInterface, cBlockPluginInterface & a_PluginInterface, Vector3i a_RelPos, cChunk & a_Chunk) +void cBlockHandler::Check(cChunkInterface & a_ChunkInterface, cBlockPluginInterface & a_PluginInterface, Vector3i a_RelPos, cChunk & a_Chunk) const { } @@ -237,7 +220,7 @@ void cBlockHandler::Check(cChunkInterface & a_ChunkInterface, cBlockPluginInterf -ColourID cBlockHandler::GetMapBaseColourID(NIBBLETYPE a_Meta) +ColourID cBlockHandler::GetMapBaseColourID(NIBBLETYPE a_Meta) const { return 0; } @@ -246,7 +229,7 @@ ColourID cBlockHandler::GetMapBaseColourID(NIBBLETYPE a_Meta) -bool cBlockHandler::IsInsideBlock(Vector3d a_Position, const NIBBLETYPE a_BlockMeta) +bool cBlockHandler::IsInsideBlock(Vector3d a_Position, const NIBBLETYPE a_BlockMeta) const { return true; } @@ -255,6 +238,17 @@ bool cBlockHandler::IsInsideBlock(Vector3d a_Position, const NIBBLETYPE a_BlockM +const cBlockHandler & cBlockHandler::For(BLOCKTYPE a_BlockType) +{ + // Dummy handler. + static cBlockHandler Handler(E_BLOCK_AIR); + return Handler; +} + + + + + OwnedBlockEntity cBlockEntity::CreateByBlockType(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, Vector3i a_Pos, cWorld * a_World) { return nullptr; |