I have created a mob farm which I want to be able to turn into an XP farm at the switch of a button. Basically a multitude of mobs spawn at the top, fall down, and die. I want to add a dispenser that dispenses water so I can catch the mobs and kill them for the XP instead of their drops. However, creepers start to self-destruct as soon as I start hitting them through my half-slabs. I've tried using different combinations of slabs, stairs, fences, etc, but the creepers keep blowing up my mobs. Is there any way to stop this? I can draw a diagram of the XP farm if it would help.
I have been testing this vigorously and I've found a combination of slabs and blocks and that means that the creeper cannot see you and won't explode, no matter how much it is attacked. Here it is: Notice that the player is standing on a bottom slab, so they can peer into the whole easily.
Another possible solution that I found during testing is to use a combination of stairs and slabs and a bow. While this does affect the durability of the bow I think that this can be overlooked by how effective this system is.
The setup for the upside down stairs stops skeletons from shooting at you and the distance stops the creepers from exploding.
First thing to note: if a Creeper is standing in water, even if they do explode, they won't blow up any blocks, but the explosion will still deal damage to you and other mobs around them.
Ranged weaponry is the best bet for killing creepers, as they need to be within 3 blocks of the player to trigger an explosion. If you stand outside of this range and shoot them, then they will not explode.
The only other option I could suggest is to set up cats in a line, so ensure that the Creepers don't fall down the same shaft as the rest of the mobs, and set up an automatic killing area for them specifically. You'd lose a little bit of exp, but you wouldn't have to deal with them at all.
So, I didn't really like the answer to this one, since I had a 3x3 killing chamber. Thus I kept experimenting and happily I found a solution that works. Unless your killing chamber is bigger of course. So the design is quite simple. Creeper on a full block, while you are on a bottomslab 2 blocks away with a full block (below) and a slab (in on top) between you and the creepers, so that you don't move into the danger zone.
As a bonus I also designed a redstone contraption, that lets you turns your mobfarm into an XP farm by adding a layer of solid blocks, instead of using water. This way you can still kill the mobs in one hit. You can probably find a better design, but I'm quite proud of it anyway.
Likewise the picture is below.