summaryrefslogtreecommitdiffstats
path: root/src/Simulator/FluidSimulator.h
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@outlook.com>2020-07-29 02:18:59 +0200
committerTiger Wang <ziwei.tiger@outlook.com>2020-08-02 16:52:06 +0200
commit225c2fa9f6bc2ebffcc9160090482e6833a220ce (patch)
treeb72a5b27b49e38fe160da580a6f659a1a9d93308 /src/Simulator/FluidSimulator.h
parentAdd WakeUp/AddBlock distinction (diff)
downloadcuberite-225c2fa9f6bc2ebffcc9160090482e6833a220ce.tar
cuberite-225c2fa9f6bc2ebffcc9160090482e6833a220ce.tar.gz
cuberite-225c2fa9f6bc2ebffcc9160090482e6833a220ce.tar.bz2
cuberite-225c2fa9f6bc2ebffcc9160090482e6833a220ce.tar.lz
cuberite-225c2fa9f6bc2ebffcc9160090482e6833a220ce.tar.xz
cuberite-225c2fa9f6bc2ebffcc9160090482e6833a220ce.tar.zst
cuberite-225c2fa9f6bc2ebffcc9160090482e6833a220ce.zip
Diffstat (limited to '')
-rw-r--r--src/Simulator/FluidSimulator.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Simulator/FluidSimulator.h b/src/Simulator/FluidSimulator.h
index e9157fa69..2dc499375 100644
--- a/src/Simulator/FluidSimulator.h
+++ b/src/Simulator/FluidSimulator.h
@@ -43,14 +43,11 @@ public:
cFluidSimulator(cWorld & a_World, BLOCKTYPE a_Fluid, BLOCKTYPE a_StationaryFluid);
- // cSimulator overrides:
- virtual bool IsAllowedBlock(BLOCKTYPE a_BlockType) override;
-
/** Returns a unit vector in the direction the fluid is flowing or a zero-vector if not flowing. */
virtual Vector3f GetFlowingDirection(int a_X, int a_Y, int a_Z);
/** Creates a ChunkData object for the simulator to use. The simulator returns the correct object type. */
- virtual cFluidSimulatorData * CreateChunkData(void) { return nullptr; }
+ virtual cFluidSimulatorData * CreateChunkData(void) = 0;
bool IsFluidBlock (BLOCKTYPE a_BlockType) const { return (a_BlockType == m_FluidBlock); }
bool IsStationaryFluidBlock(BLOCKTYPE a_BlockType) const { return (a_BlockType == m_StationaryFluidBlock); }
@@ -65,6 +62,9 @@ public:
bool IsHigherMeta(NIBBLETYPE a_Meta1, NIBBLETYPE a_Meta2);
protected:
+
+ bool IsAllowedBlock(BLOCKTYPE a_BlockType);
+
BLOCKTYPE m_FluidBlock; // The fluid block type that needs simulating
BLOCKTYPE m_StationaryFluidBlock; // The fluid block type that indicates no simulation is needed
};