FallenMoonNetwork/CanaryMod — pull request #94 by M4411K4 (2013-01-12 08:43:16+00:00)
Title: Small fix for riding methods, and adding a big change to support slot click events and a few other things

The SLOT_CLICK event is to help improve custom crafting in addition to giving much more power to slot control.
* slot clicks can be canceled to prevent items from being picked up, dropped, or moved around
* informs plugin creators which type of slot was clicked, if shift was held down, if it was the left mouse click or right mouse click, if it was clicked outside of a window (which can be used to prevent items being dropped outside), and which player clicked the slot
* also provides the item in the slot clicked, and the item held by the mouse cursor (when picking up items)
* * this event triggers *before* item pickup or drop. So for example, if picking up an item, it will show the cursor item is null because it has not yet picked up the item. You can still figure out which item will end up in the cursor though by checking the clicked item
* plugin creators can also update any slot in the clicked inventory, allowing them to add, move, or remove items. This can help with custom crafting

Most of the changes made are to support this new SLOT_CLICK event, such as storing OContainer in ItemArray classes. I attempted to add these changes in a way where it shouldn't break older plugins that may have directly tried creating ItemArray classes. This is also why I added the "getInventory()" overrides as a workaround to insert OContainer into older ItemArray classes. OContainer is needed to help define slots and send slot updates to the clients.

NOTE: My decompiler isn't the greatest, so some of the files I moved up into Canary (such as OContainerXX files) may need to be modified.