Tutorials/Hoglin farming

Hoglin farming automates the process of killing hoglins for leather, raw porkchops, and cooked porkchops.

Why Bother?
Cooked porkchops are a very nutritious food that can now be automatically farmed. Cooked porkchops restore the same amount of hunger and give the same amount of saturation as steak. Cooked porkchops also give you more saturation and restore more hunger than cooked chicken, which you can also automatically farm. Making a Hoglin farm lets you automatically get stacks and stacks of cooked porkchops and leather. If you choose to, you can make your Hoglin farm into a Hoglin and XP farm.

Raw porkchops and leather can both be traded for emeralds and leather can alternatively be used to produce books, which can also be traded for emeralds, enchanted or used to create bookshelves and lecterns.

Mechanics
Hoglins can only spawn in a Crimson Forest, and are afraid of Warped Fungus, Nether Portals and Respawn Anchors. If a Hoglin or baby Hoglin is standing on a slab with lava poured on top of it with hopper s underneath the slabs, the Hoglin will burn in the lava, but the hoppers will pick up its drops. Hoglins drop 2-4 raw porkchops (cooked porkchops if on fire) (maximum of 7 with LootingIII), 0-2 leather (maximum of 5 with Looting III), and 5[Java Edition] or 1-3[Bedrock Edition] experience orbs if killed by player or tamed wolf. Looting can't be used unless it's a mob softener. Warped Fungus is immovable via pistons, so Respawn Anchors are the way to go. This can be expensive, however.

Small, automatic
Bedrock Edition 1.16:

Large, automatic
Notice: This video was made in Java Edition 20w07a. The actual showcase of this design starts at 1:38, everything before that is an intro.