MinecraftForge/MinecraftForge — pull request #760 by MachineMuse (2013-09-04 21:12:36+00:00)
Title: Mouse Update Event

The main reason for this is because several mods were using the Mouse.getDWheel() function, which updates each time it was called, thus messing them all up. This way, all mods have access to all Mouse Event data as it happens, instead of scrambling to try and be the first to access it each tick.

This also exposes a bunch of other info to mods, such as the exact xy coordinates where a click or movement occurred (instead of waiting for the Forge event update and checking the xy coordinates at that time). This could allow features such as gesture-based input to be implemented.

Currently, the event object is initialized with as much information as possible; this makes concurrency safer in case the event bus ever gets multithreaded. As long as it's on a single thread, though, simply notifying the mods each time the mouse event pointer is incremented would be sufficient. I'll change it to that if desired.