summaryrefslogtreecommitdiffstats
path: root/src/Blocks/BlockFluid.h
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2015-06-30 16:50:15 +0200
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2015-07-14 22:46:30 +0200
commit8656e149c8820272a882406912790f0075ed5f28 (patch)
treeb4f89f69dfb026f76862046637fd99162a49d3c9 /src/Blocks/BlockFluid.h
parentMerge pull request #2352 from mmdk95/master (diff)
downloadcuberite-8656e149c8820272a882406912790f0075ed5f28.tar
cuberite-8656e149c8820272a882406912790f0075ed5f28.tar.gz
cuberite-8656e149c8820272a882406912790f0075ed5f28.tar.bz2
cuberite-8656e149c8820272a882406912790f0075ed5f28.tar.lz
cuberite-8656e149c8820272a882406912790f0075ed5f28.tar.xz
cuberite-8656e149c8820272a882406912790f0075ed5f28.tar.zst
cuberite-8656e149c8820272a882406912790f0075ed5f28.zip
Diffstat (limited to '')
-rw-r--r--src/Blocks/BlockFluid.h26
1 files changed, 19 insertions, 7 deletions
diff --git a/src/Blocks/BlockFluid.h b/src/Blocks/BlockFluid.h
index 58b3ce042..56a2ad3c2 100644
--- a/src/Blocks/BlockFluid.h
+++ b/src/Blocks/BlockFluid.h
@@ -18,20 +18,17 @@ public:
{
}
-
virtual void ConvertToPickups(cItems & a_Pickups, NIBBLETYPE a_BlockMeta) override
{
// No pickups
}
-
virtual bool DoesIgnoreBuildCollision(void) override
{
return true;
}
-
virtual void Check(cChunkInterface & a_ChunkInterface, cBlockPluginInterface & a_PluginInterface, int a_RelX, int a_RelY, int a_RelZ, cChunk & a_Chunk) override
{
switch (m_BlockType)
@@ -49,6 +46,17 @@ public:
}
super::Check(a_ChunkInterface, a_PluginInterface, a_RelX, a_RelY, a_RelZ, a_Chunk);
}
+
+ virtual ColourID GetMapBaseColourID(NIBBLETYPE a_Meta) override
+ {
+ UNUSED(a_Meta);
+ if (IsBlockWater(m_BlockType))
+ {
+ return 12;
+ }
+ ASSERT(!"Unhandled blocktype in fluid/water handler!");
+ return 0;
+ }
} ;
@@ -66,8 +74,7 @@ public:
{
}
-
- /// Called to tick the block
+ /** Called to tick the block */
virtual void OnUpdate(cChunkInterface & cChunkInterface, cWorldInterface & a_WorldInterface, cBlockPluginInterface & a_PluginInterface, cChunk & a_Chunk, int a_RelX, int a_RelY, int a_RelZ) override
{
if (a_Chunk.GetWorld()->ShouldLavaSpawnFire())
@@ -80,8 +87,7 @@ public:
}
}
-
- /// Tries to start a fire near the lava at given coords. Returns true if fire started.
+ /** Tries to start a fire near the lava at given coords. Returns true if fire started. */
static bool TryStartFireNear(int a_RelX, int a_RelY, int a_RelZ, cChunk & a_Chunk)
{
// Pick a block next to this lava block:
@@ -132,6 +138,12 @@ public:
} // for i - CrossCoords[]
return false;
}
+
+ virtual ColourID GetMapBaseColourID(NIBBLETYPE a_Meta) override
+ {
+ UNUSED(a_Meta);
+ return 4;
+ }
} ;