PocketMine/PocketMine-MP — pull request #2160 by sekjun9878 (2014-10-06 02:29:17+00:00)
Title: Implement proper bonemeal behaviour #2002

This PR is still in progress of being completed. Please do not merge yet.

This PR adds the Plant class and the Fertilisable class to allow bonemeal behaviour to be modular and editable from a single class. Plant and fertilisable classes then extend this class.

The classes use the abstract keyword, as mentioned in #2159.

Late static binding is used to simplify the action of checking and incrementing the number of bonemeals applied. The same method should be used for all Fertilisables. All the child classes/blocks have to do is to define how many fertilisers(bonemeals) they need to fertilise, and define their own fertlise function to customise how they will behave upon being fertlised - as that behaviour is different to each block.

Again, This PR is still in progress of being completed. Please do not merge yet. It still needs to undergo testing and bug fixing.

PS: Late Static Binding!