This was mostly done automatically and then visually inspected for obvious errors.
All //-style comments should have a 2-space separation from the code, and 1 space after the comment sign.
Based on suggestions of @worktycho
* Repeaters now walk their data structure only when needed
* Fixed a bug with cChunkData returning an incorrect value for whether a
meta had changed
* Fixed a special case with the wrong ChunkX/Z values being used to
calculate a relative position
* Simplified data structure adding and removing operations (no more
pointers!)
- Removed one character of whitespace :D
+ Moved all simulator data into individual chunks
* Cleaned up parameters for functions and some code
* Fixed repeaters powering off faster than they power on
The main issue before was that, although the redstone simulator stored
blocks to be simulated in individual cChunks, other data, such as
powered lists, and etcetera, were global regardless of which chunk was
being simulated. Therefore, with worlds with lots of redstone, each tick
saw the ticking of chunks, which themselves iterated through the entire
dataset needlessly, creating LOTS of lag. Should be better now :)