Zombie Pigman farming is a method of obtaining gold nuggets and rotten flesh renewably by using spawn platforms or nether portals to spawn zombie pigmen and moving them to a killing zone.
To construct a farm in the Nether, one can build platforms for Zombie Pigmen to spawn on, with trapdoors on the edge, and place Slabs on the floors of all surrounding areas (or just fill them in) so Pigmen only spawn on these platforms. The use of Lava flows cannot be used to collect the Zombie Pigmen into a central area, as lava currents do not push mobs, so pistons must be used.
If you want to take this to the next level, get to the top of the Nether ceiling and build this farm:
To build a farm in the Overworld, one can construct a rectangular prism of interlocking Nether Portals (to save Obsidian) and put open Trapdoors on the edges of the two bottom Obsidian blocks so that the Zombie Pigmen walk off. From here, one can use Water to collect the Zombie Pigmen into a fall or suffocation trap. Snow golems are a nice alternative.
Since the availability of larger portals, it is no longer necessary to make a prism of portals as large portals can do as well. However, the same practice can still be used to make a hyper-efficient farm by building portals in a ring (one open to each cardinal direction) from a largest outer size to decreasing inner sizes, with per space efficiency of 82.8% achievable (out of a 23x23x23 cube with 10,080 portal blocks, using 1,800 obsidian). Walling off the outer side of the largest portals and placing trapdoors on the edge of the smallest inner portals will allow the pigmen to spawn and wander into the drop or push each other into it. If a collector and crusher is placed directly beneath this point, the pigmen inside the farm will become angered and will track the player after the player has attacked one of them. This can be used to draw many of the pigmen out of the farm into the crusher at will.
One problem with Overworld gold farms is that it is occasionally possible for angered pigmen to return to the Nether through a portal. If precautions are not taken in the form of extra portals leading to a containment area, the player may be ambushed by one or more angry pigmen when they return to the Nether though a nearby portal. Similarly, one must be careful not to use a portal in the Nether which takes them into the farm for the same reason.
Using a fall trap has the benefit of automation, but with a suffocation trap, one is able to use Pistons to control the amount of damage to the Pigmen. This way, one can obtain experience and rare drops by finishing off the Pigmen manually, perhaps with a Looting enchantment.
If care is taken, a falling trap may also be used to collect experience and rare drops as well. Water may be used to force the Pigmen off of a cliff that is 22 blocks high, ending in a landing area far below their spawn point. This landing area should be next to a room that whose floor is one block lower than the landing area, with a ceiling that is only 2 blocks high. This will allow the player to see and attack the feet of the Pigmen, without the Pigmen being able to attack the player. Slabs or a similar block must also be used to block baby pigmen from escaping. The player may then descend to this room and finish off the Pigmen with one or two sword strikes. To kill all pigmen automatically, use a fall of more than 24 blocks.
For a cheap and easy starting trap, try the method in this video:
Or this video:
Expand your zombie pigman grinder as you see fit.
For a more advanced set up that is fully automatic, try this method in this video:
|Enchanting and smelting|