summaryrefslogtreecommitdiffstats
path: root/tests/Generating
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@outlook.com>2020-09-20 15:50:52 +0200
committerGitHub <noreply@github.com>2020-09-20 15:50:52 +0200
commit68cced73afe546328cf94ed07c57deee47bfadec (patch)
tree88be88e3fd4a208b9849e526f1877caa44058ab5 /tests/Generating
parentAdded armor and shulker box cleaning (#4875) (diff)
downloadcuberite-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/Generating')
-rw-r--r--tests/Generating/Stubs.cpp56
1 files changed, 24 insertions, 32 deletions
diff --git a/tests/Generating/Stubs.cpp b/tests/Generating/Stubs.cpp
index 2982457ab..f828b05ee 100644
--- a/tests/Generating/Stubs.cpp
+++ b/tests/Generating/Stubs.cpp
@@ -101,15 +101,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);
}
@@ -124,7 +116,7 @@ bool cBlockHandler::GetPlacementBlockTypeMeta(
eBlockFace a_BlockFace,
const Vector3i a_CursorPos,
BLOCKTYPE & a_BlockType, NIBBLETYPE & a_BlockMeta
-)
+) const
{
return true;
}
@@ -133,7 +125,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
{
}
@@ -141,7 +133,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
{
}
@@ -157,7 +149,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();
}
@@ -166,7 +158,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;
}
@@ -175,7 +167,7 @@ bool cBlockHandler::CanBeAt(cChunkInterface & a_ChunkInterface, const Vector3i a
-bool cBlockHandler::IsUseable()
+bool cBlockHandler::IsUseable() const
{
return false;
}
@@ -184,7 +176,7 @@ bool cBlockHandler::IsUseable()
-bool cBlockHandler::IsClickedThrough(void)
+bool cBlockHandler::IsClickedThrough(void) const
{
return false;
}
@@ -193,7 +185,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);
}
@@ -202,7 +194,7 @@ bool cBlockHandler::DoesIgnoreBuildCollision(cChunkInterface & a_ChunkInterface,
-bool cBlockHandler::DoesDropOnUnsuitable(void)
+bool cBlockHandler::DoesDropOnUnsuitable(void) const
{
return true;
}
@@ -211,7 +203,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
{
}
@@ -219,7 +211,7 @@ void cBlockHandler::Check(cChunkInterface & a_ChunkInterface, cBlockPluginInterf
-ColourID cBlockHandler::GetMapBaseColourID(NIBBLETYPE a_Meta)
+ColourID cBlockHandler::GetMapBaseColourID(NIBBLETYPE a_Meta) const
{
return 0;
}
@@ -228,7 +220,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;
}
@@ -237,6 +229,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;
@@ -401,14 +404,3 @@ cItem::cItem(
void cItem::Empty()
{
}
-
-
-
-
-
-cBlockHandler & cBlockHandler::GetBlockHandler(BLOCKTYPE a_BlockType)
-{
- // Dummy handler.
- static cBlockHandler Handler(E_BLOCK_AIR);
- return Handler;
-}