Always use relative coordinates in AddBlock
+ Pass block, use relatives * Fixes everything immediately converting abs back to rel and getting block, when these data were already available
This commit is contained in:
@@ -21,26 +21,7 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
virtual void WakeUp(cChunk & a_Chunk, Vector3i a_Position, BLOCKTYPE a_Block) 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
|
||||
{
|
||||
return new cIncrementalRedstoneSimulatorChunkData;
|
||||
}
|
||||
|
||||
virtual bool IsAllowedBlock(BLOCKTYPE a_BlockType) override
|
||||
{
|
||||
return IsRedstone(a_BlockType);
|
||||
}
|
||||
|
||||
virtual void AddBlock(cChunk & a_Chunk, Vector3i a_Position, BLOCKTYPE a_Block) override;
|
||||
static const cRedstoneHandler * GetComponentHandler(BLOCKTYPE a_BlockType);
|
||||
|
||||
/** 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 */
|
||||
@@ -164,7 +145,20 @@ private:
|
||||
}
|
||||
}
|
||||
|
||||
static const cRedstoneHandler * GetComponentHandler(BLOCKTYPE a_BlockType);
|
||||
private:
|
||||
|
||||
virtual void WakeUp(cChunk & a_Chunk, Vector3i a_Position, BLOCKTYPE a_Block) 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
|
||||
{
|
||||
return new cIncrementalRedstoneSimulatorChunkData;
|
||||
}
|
||||
|
||||
virtual void AddBlock(cChunk & a_Chunk, Vector3i a_Position, BLOCKTYPE a_Block) override;
|
||||
|
||||
private:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user