BodhiM/NeXTQuarry — pull request #2 by therealdpk (2013-08-05 16:14:19+00:00)
Title: Minor bug fix and some performance improvements

This pull comes with a minor bug fix (NPE when you hit monsters, in some circumstances) but more importantly it comes with performance improvements.

The goal was to reduce the number of chunk updates sent down the wire. As you can see in the commits the furnace and quarry blocks are only recreated if necessary and the chunk queue is emptied every time processQueue is called. This halved the number of chunk updates sent when the quarry was active and dropped the CU to 0 when the quarry was idle (chest full).

Additionally, profiling indicated that containsBlock was using a noticeable amount of CPU. Re-using the same allocated object dropped containsBlock CPU by half.