diff options
author | Tiger Wang <ziwei.tiger@outlook.com> | 2020-07-26 15:15:00 +0200 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@outlook.com> | 2020-07-26 15:16:46 +0200 |
commit | 4e5ab02a589582e2fa908909e3ee30360dd08be5 (patch) | |
tree | 848bb5338a5c5e52168702ee78058a6cc76f867f /src/Simulator/IncrementalRedstoneSimulator/IncrementalRedstoneSimulator.h | |
parent | Fix incorrect big flower translation (diff) | |
download | cuberite-4e5ab02a589582e2fa908909e3ee30360dd08be5.tar cuberite-4e5ab02a589582e2fa908909e3ee30360dd08be5.tar.gz cuberite-4e5ab02a589582e2fa908909e3ee30360dd08be5.tar.bz2 cuberite-4e5ab02a589582e2fa908909e3ee30360dd08be5.tar.lz cuberite-4e5ab02a589582e2fa908909e3ee30360dd08be5.tar.xz cuberite-4e5ab02a589582e2fa908909e3ee30360dd08be5.tar.zst cuberite-4e5ab02a589582e2fa908909e3ee30360dd08be5.zip |
Diffstat (limited to 'src/Simulator/IncrementalRedstoneSimulator/IncrementalRedstoneSimulator.h')
-rw-r--r-- | src/Simulator/IncrementalRedstoneSimulator/IncrementalRedstoneSimulator.h | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/src/Simulator/IncrementalRedstoneSimulator/IncrementalRedstoneSimulator.h b/src/Simulator/IncrementalRedstoneSimulator/IncrementalRedstoneSimulator.h index 8213eddae..3523463bd 100644 --- a/src/Simulator/IncrementalRedstoneSimulator/IncrementalRedstoneSimulator.h +++ b/src/Simulator/IncrementalRedstoneSimulator/IncrementalRedstoneSimulator.h @@ -2,26 +2,29 @@ #pragma once #include "../RedstoneSimulator.h" +#include "RedstoneHandler.h" #include "RedstoneSimulatorChunkData.h" -class cIncrementalRedstoneSimulator: +class cIncrementalRedstoneSimulator final : public cRedstoneSimulator { using Super = cRedstoneSimulator; public: - cIncrementalRedstoneSimulator(cWorld & a_World): + cIncrementalRedstoneSimulator(cWorld & a_World) : Super(a_World) { } - virtual void Simulate(float a_dt) override; - virtual void SimulateChunk(std::chrono::milliseconds a_Dt, int a_ChunkX, int a_ChunkZ, cChunk * a_Chunk) override {} + virtual void Simulate(float Dt) override {}; + virtual void SimulateChunk(std::chrono::milliseconds Dt, int ChunkX, int ChunkZ, cChunk * Chunk) override; + + void ProcessWorkItem(cChunk & Chunk, cChunk & TickingSource, const Vector3i Position); virtual cIncrementalRedstoneSimulatorChunkData * CreateChunkData() override { @@ -36,8 +39,7 @@ public: virtual void AddBlock(Vector3i a_Block, cChunk * a_Chunk) override; /** Returns if a block is a mechanism (something that accepts power and does something) - Used by torches to determine if they will power a block - */ + Used by torches to determine if they will power a block */ inline static bool IsMechanism(BLOCKTYPE Block) { switch (Block) @@ -158,14 +160,9 @@ public: } } - cIncrementalRedstoneSimulatorChunkData * GetChunkData() { return &m_Data; } - static const cRedstoneHandler * GetComponentHandler(BLOCKTYPE a_BlockType); private: static std::unique_ptr<cRedstoneHandler> CreateComponent(BLOCKTYPE a_BlockType); - - // oh yea its crazy time - cIncrementalRedstoneSimulatorChunkData m_Data; } ; |