Tutorials/TNT cannons/t-gun

Make a normal cannon barrel, then break the blocks to the sides of your mounting block. This is where the aim TNT will be. Then, place water 2 blocks to the sides from your main "barrel". You can prevent it from pouring everywhere by placing blocks (e.g. slabs as in the schematics) around these troughs. But one block must be an opaque block, as it will hold redstone to power a piece of aim TNT. Also, the water must flow towards the main trench.

Place a button on the back of your cannon, connect it to the main TNT charge (here, powered from the left side) and all the aim TNT. The piece on the other side will be slightly tricky: you need another line of redstone to power it. Don't place it on the other side of trench, as it will be used later. Instead, place redstone on the ground. In-line with the mounting block, place a solid block, a piece of redstone on top of it, and on the solid block next to where the aim TNT will be.

On another side of barrel, place repeaters until you'll be 2 blocks away from a piece of redstone that will power the other aim TNT. These repeaters must all be on 4 ticks. Place a block in the front of the last repeater, place redstone on the top of it, and a row of blocks on the back of it until it will be horizontally inline with the water source. Place redstone on top of the row's ends (first and last blocks in the row), place an opaque block over the front redstone on the row and place repeaters facing towards the rearmost redstone dust on the row. These repeaters must also be on 4 tick delay. Place a block to the side of the latter (the block must be over the main trench) and place blocks until you'll be 2 blocks horizontally away from the mounting block. The last block must be a solid block. Then, place a piston facing towards the front of your cannon. It will push the shell. Where the shell will be, add 2 blocks on the sides. One of them must be a power-emitting block. Place redstone all over the new row of blocks, placing repeaters if needed (for delay).

This cannon is not the easiest to build, but it is worth it.