MinecraftForge/MinecraftForge — pull request #1336 by squeek502 (2014-08-18 03:43:52+00:00)
Title: Fixed PlayerInteractEvent server/client inconsistencies

* Made Action.RIGHT_CLICK_BLOCK get handled the same on the client as it does on the server (before, the client would only react to isCanceled() and nothing else)
* Made Action.LEFT_CLICK_BLOCK get fired and handled on the client the same as it does on the server
* Made Action.RIGHT_CLICK_AIR not get fired on the client when not holding an item to match how the server fires it

As an example of what this fixes, it will stop the following code from causing desyncing when trying to plant something like potatoes (currently, the client will ignore the Result.DENY and plant the seed but the server will not allow it):
```
@SubscribeEvent
public void onPlayerInteraction(PlayerInteractEvent event)
{
if (event.action != PlayerInteractEvent.Action.RIGHT_CLICK_BLOCK)
return;

if (event.entityPlayer.getHeldItem() != null && event.entityPlayer.getHeldItem().getItem() instanceof ItemSeedFood)
{
event.useItem = Result.DENY;
}
}
```