I wouldn't mind so much if the conditions for a block to be picked up was stricter
Block must have 'air' on top
Block must have 'air' on the side.
This'll prevent the swiss cheese effect- that they'll only take from the edges, and won't leave floating trees or holes in buildings.
Though for a little extra fun- angry enderman ignore the air criteria; and will pull blocks out the way to hit the player.
(as a saving pass- enderman will
always drop a held block on death, so you can rescue it)
I like the idea of always dropping the block on death. I think throwing the block at the player when mad would also be a fun behavior, especially if it hurt you. Changing the rules would be somewhat more complex though. And you have tricky issues, such as what if the Enderman were in the air when dying? Do you just leave the block hovering in the air as well? If you make them fall like sand and gravel, then you potentially need a new type of entity as well.
Currently though there really aren't much of any rules. There's a 1 in 20 chance he'll try to pick up a block if he's not already carrying one. The block position he tries to get is then randomly decided in a two-block radius around him on the X and Z, and randomly within three blocks on Y (his height). If it's one of the blocks enabled in his carriableBlocks array, then he grabs it. That's it.
For putting them back down, it's slightly different. There's a 1 in 2000 chance he'll try to do so when carrying one. It then determines a coordinate within only a one block radius on X and Z, and only within the lower two blocks of his height. If this block is empty, and the block below it is a "normal" block (not a sign, button, etc), then he puts the block down. Again, that's it.
There's floating point math and rounding here when doing the block position calculations, so the range in which the block can be picked up could in fact vary slightly depending on the exact coordinates in the world, particularly when leaning towards the positive axes. That means it's possible that an Enderman could in fact grab a block from above his head, or place one back at eye level, in some circumstances. Almost equally as rarely, the X and Z range could even be one less on the positive-leaning axes than on the negative side. Floating point really is a butt to deal with sometimes! Hence, some of the odd behavior you see in older versions when trying to reach the Far Lands.
Enderman should be able to place activated tnt blocks.
Enderman can't carry entities, which is what an activated TNT block becomes. However, using Endermanage, they would be able to pick up regular TNT blocks, and accidentally sit them down next to a redstone source!