summaryrefslogtreecommitdiffstats
path: root/src/Blocks/BlockFluid.h
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 /src/Blocks/BlockFluid.h
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 'src/Blocks/BlockFluid.h')
-rw-r--r--src/Blocks/BlockFluid.h33
1 files changed, 11 insertions, 22 deletions
diff --git a/src/Blocks/BlockFluid.h b/src/Blocks/BlockFluid.h
index 35b702f4b..b7510b9a9 100644
--- a/src/Blocks/BlockFluid.h
+++ b/src/Blocks/BlockFluid.h
@@ -14,17 +14,11 @@ class cBlockFluidHandler:
public:
- cBlockFluidHandler(BLOCKTYPE a_BlockType):
- Super(a_BlockType)
- {
-
- }
-
-
-
+ using Super::Super;
+private:
- virtual cItems ConvertToPickups(NIBBLETYPE a_BlockMeta, cBlockEntity * a_BlockEntity, const cEntity * a_Digger, const cItem * a_Tool) override
+ virtual cItems ConvertToPickups(NIBBLETYPE a_BlockMeta, cBlockEntity * a_BlockEntity, const cEntity * a_Digger, const cItem * a_Tool) const override
{
// No pickups
return {};
@@ -34,7 +28,7 @@ public:
- virtual bool DoesIgnoreBuildCollision(cChunkInterface & a_ChunkInterface, Vector3i a_Pos, cPlayer & a_Player, NIBBLETYPE a_Meta) override
+ virtual bool DoesIgnoreBuildCollision(cChunkInterface & a_ChunkInterface, Vector3i a_Pos, cPlayer & a_Player, NIBBLETYPE a_Meta) const override
{
return true;
}
@@ -43,7 +37,7 @@ public:
- virtual ColourID GetMapBaseColourID(NIBBLETYPE a_Meta) override
+ virtual ColourID GetMapBaseColourID(NIBBLETYPE a_Meta) const override
{
UNUSED(a_Meta);
if (IsBlockWater(m_BlockType))
@@ -58,7 +52,7 @@ public:
- virtual bool CanSustainPlant(BLOCKTYPE a_Plant) override
+ virtual bool CanSustainPlant(BLOCKTYPE a_Plant) const override
{
return (
(a_Plant == E_BLOCK_BEETROOTS) ||
@@ -82,14 +76,9 @@ class cBlockLavaHandler:
public:
- cBlockLavaHandler(BLOCKTYPE a_BlockType):
- Super(a_BlockType)
- {
- }
-
-
-
+ using Super::Super;
+private:
virtual void OnUpdate(
cChunkInterface & a_ChunkInterface,
@@ -97,7 +86,7 @@ public:
cBlockPluginInterface & a_PluginInterface,
cChunk & a_Chunk,
const Vector3i a_RelPos
- ) override
+ ) const override
{
if (a_Chunk.GetWorld()->ShouldLavaSpawnFire())
{
@@ -165,7 +154,7 @@ public:
- virtual ColourID GetMapBaseColourID(NIBBLETYPE a_Meta) override
+ virtual ColourID GetMapBaseColourID(NIBBLETYPE a_Meta) const override
{
UNUSED(a_Meta);
return 4;
@@ -175,7 +164,7 @@ public:
- virtual bool CanSustainPlant(BLOCKTYPE a_Plant) override
+ virtual bool CanSustainPlant(BLOCKTYPE a_Plant) const override
{
return false;
}