diff options
author | Alexander Harkness <bearbin@gmail.com> | 2013-11-24 15:19:41 +0100 |
---|---|---|
committer | Alexander Harkness <bearbin@gmail.com> | 2013-11-24 15:19:41 +0100 |
commit | 675b4aa878f16291ce33fced48a2bc7425f635ae (patch) | |
tree | 409914df27a98f65adf866da669429c4de141b6f /source/Simulator/SandSimulator.h | |
parent | LineBlockTracer: Using the coord-based block faces. (diff) | |
download | cuberite-675b4aa878f16291ce33fced48a2bc7425f635ae.tar cuberite-675b4aa878f16291ce33fced48a2bc7425f635ae.tar.gz cuberite-675b4aa878f16291ce33fced48a2bc7425f635ae.tar.bz2 cuberite-675b4aa878f16291ce33fced48a2bc7425f635ae.tar.lz cuberite-675b4aa878f16291ce33fced48a2bc7425f635ae.tar.xz cuberite-675b4aa878f16291ce33fced48a2bc7425f635ae.tar.zst cuberite-675b4aa878f16291ce33fced48a2bc7425f635ae.zip |
Diffstat (limited to 'source/Simulator/SandSimulator.h')
-rw-r--r-- | source/Simulator/SandSimulator.h | 63 |
1 files changed, 0 insertions, 63 deletions
diff --git a/source/Simulator/SandSimulator.h b/source/Simulator/SandSimulator.h deleted file mode 100644 index 6e9ea15ac..000000000 --- a/source/Simulator/SandSimulator.h +++ /dev/null @@ -1,63 +0,0 @@ - -#pragma once - -#include "Simulator.h" - - - - - -/// Despite the class name, this simulator takes care of all blocks that fall when suspended in the air. -class cSandSimulator : - public cSimulator -{ -public: - cSandSimulator(cWorld & a_World, cIniFile & a_IniFile); - - // cSimulator overrides: - virtual void Simulate(float a_Dt) override {} // Unused in this simulator - virtual void SimulateChunk(float a_Dt, int a_ChunkX, int a_ChunkZ, cChunk * a_Chunk) override; - virtual bool IsAllowedBlock(BLOCKTYPE a_BlockType) override; - - /// Returns true if a falling-able block can start falling through the specified block type - static bool CanStartFallingThrough(BLOCKTYPE a_BlockType); - - /// Returns true if an already-falling block can pass through the specified block type (e. g. torch) - static bool CanContinueFallThrough(BLOCKTYPE a_BlockType); - - /// Returns true if the falling block rematerializing will replace the specified block type (e. g. tall grass) - static bool IsReplacedOnRematerialization(BLOCKTYPE a_BlockType); - - /// Returns true if the specified block breaks falling blocks while they fall through it (e. g. halfslabs) - static bool DoesBreakFallingThrough(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta); - - /** Called when a block finishes falling at the specified coords, either by insta-fall, - or through cFallingBlock entity. - It either rematerializes the block (a_FallingBlockType) at the specified coords, or creates a pickup, - based on the block currently present in the world at the dest specified coords - */ - static void FinishFalling( - cWorld * a_World, int a_BlockX, int a_BlockY, int a_BlockZ, - BLOCKTYPE a_FallingBlockType, NIBBLETYPE a_FallingBlockMeta - ); - -protected: - bool m_IsInstantFall; // If set to true, blocks don't fall using cFallingBlock entity, but instantly instead - - int m_TotalBlocks; // Total number of blocks currently in the queue for simulating - - virtual void AddBlock(int a_BlockX, int a_BlockY, int a_BlockZ, cChunk * a_Chunk) override; - - /// Performs the instant fall of the block - removes it from top, Finishes it at the bottom - void DoInstantFall(cChunk * a_Chunk, int a_RelX, int a_RelY, int a_RelZ); -}; - - - - -/// Per-chunk data for the simulator, specified individual chunks to simulate; Data is not used -typedef cCoordWithIntList cSandSimulatorChunkData; - - - - |