MinecraftForge/MinecraftForge — pull request #243 by bspkrs (2012-11-08 05:51:18+00:00)
Title: New event: PlayerEvent.HarvestBlock

Not intended to be a cancelable event. A separate event that fires before item damage is applied should be created for the purpose of cancelling a block harvest attempt.

This event provides a hook that's called when a block has been committed to being broken by a player. It provides the same parameters that are available in Block.onBlockHarvested(world, x, y, z, metadata, player).

This code is fully tested and behaves as expected.