Closed Cyborger1 closed 2 years ago
Huge thanks for doing this mate, sorry for being so slow responding (life eh!). Merged and very much appreciated.
FYI; I've made a pull request on the Plugin Hub to get this updated. Again, apologies for sitting on this for so long.
In the first commit, I removed the need to use a
BufferedImage
to draw the on screen graphics. You can use the object given as an argument to therender()
method. This was most likely the culprit for the large CPU usage this plugin caused.I also changed the way drops are cleared from the
LinkedList
, usingremoveIf
instead. It's a little better, but this could probably be optimized further. However, the amount of drops in the list at any given time is small enough that this is unlikely to be of any major concern.Second commit fixes #1 by adding an if check for
div > 0
before attempting to add the dither.