MinecraftForge/MinecraftForge — pull request #776 by copyboy (2013-09-12 11:40:42+00:00)
Title: Change when PlayerInteractEvent gets fired

I messed up when trying to update my last pull request (#715), and it was automatically merged. This is it updated and resubmitted. The only change because of another issue with x or z being -1. Obviously those are valid block positions. Here's the old PR's comment:

- Cancelling the event on the client will not send a packet to the server, so no event will be fired on it.
- Left click block fires on client side.
- Setting useItem to DENY will prevent the block from being broken, but will still send a dig packet (block will still break in creative if server doesn't set it to DENY as well).
- Setting useBlock to DENY will prevent the block's onBlockClicked method to be called.
- Setting useItem to ALLOW will allow blocks to be broken in adventure mode.
- onBlockClicked fires regardless of gamemode, as long as the block isn't broken instantly.
- Right click air, clicking without an item in hand will still send a packet to the server, causing a right click air event.

I believe these changes are for the better, they allow for more control over block breaking and interaction and generally make things more consistent - in my opinion. But depending on if and how people have used PlayerInteractEvent, they may have to rewrite some of their code to adjust for these changes.