aidancbrady/Mekanism — pull request #179 by unpairedbracket (2013-07-06 02:33:03+00:00)
Title: Add Power Reading to EnergyMeter

I've added a record of the energy passing through networks in the past tick to allow the EnergyMeter to display the power passing through the network. To do this I needed to register a tick handler to clear the amount of energy after each tick.
I realised that having each network implement ITickHandler and register with TickRegistry would probably stop them being garbage collected and cause memory leaks because they can't be removed from the registry, so I added an EnergyNetworkRegistry that networks can register with and be removed from, and which acts as a central tick handler. I had to rewrite EnergyNetwork.split() to stop it from creating loads of extra networks and NetworkFinder to facilitate that.
I understand that I may have made too drastic changes to internal implementation stuff in the energy networks, but even if you can't merge because of that I hope I've given you an idea of how you could implement it :)