Tutorials/Creeper farming

Charged creeper farming is

Creeper only farm
When trapdoors are placed on a 2 high ceiling, it lowers the height to $1 13/16$ blocks heigh. This is tall enough to allow creepers to spawn, but short enough to prevent other mobs such as zombies and skeletons. $$, this mechanic is somewhat buggy and may not work.

Charged creeper farm
This farm works with a general mob farm attached to a filter to obtain only the creepers. It then gives each creeper its own 'cell.' The system detects when lightning strikes a cell and then moves the charged creeper into a separate area.

This type of farm is very expensive to build and is not recommended unless you have a lot of time and resources. It is probably better to create a creeper only farm and use a channeling trident to charge the creepers. The mob filter however may be interesting for platforms which do not have reliable creeper only farms.

Charging creepers
Charged creepers are necessary to obtain mob heads. Charged creeper farming is one way to create charged creepers. Since the introduction of Channeling tridents, these methods have mostly become obsolete. However, they may still be useful in some editions.

In order for a creeper to become charged, lightning must strike within a 4x4 area of it. Charged creepers despawn just like regular creepers, so it may be prudent to nametag any creepers that you wish to keep for an extended period of time.

Channeling trident
You can use a trident with the Channeling enchantment to summon lightning during a thunderstorm. Simply create a collection area for a Creeper farm that is small enough that the creepers will be within 4 blocks of the lightning strike. Then, wait for a thunderstorm and throw a channeling trident at one of the creepers. Note that the creepers must be exposed to the sky for the Channeling enchantment to work. It is recommended to have the Loyalty enchantment on the trident to allow for easy retrieval.

Creeper field
Creeper fields are one of the simplest charged creeper farm designs. They consist of a flat field with 'cells' dug into ground containing creepers. This kind of farm is easiest to create on flat surroundings. Once built, the farm can be set up to supply mob heads with minimal effort. This can be achieved by placing trapdoors underneath the cells leading to a 'detonation chamber,' a room for blowing up other mobs with the charged creepers to obtain heads.

It is possible to make this type of farm more efficient by surrounding the creeper with other mobs. If there is an entity within a 3x3 area of the lightning strike, the lighting will strike at that entity instead. Manipulating lightning like this is known as "lightning farming." For more information, see lightning mechanics.