Gold Farm
A whole zombified piglin gold farm in one block, in the style of Easy Villagers. Pick up calm zombified piglins, put them into a Gold Farm and collect gold. No giant build, no lag.
Fabric, Minecraft 1.21.11. Needs Fabric API. Install on the server and the client.
Features
- Capture piglins: sneak + right click with an empty hand on a zombified piglin that is not angry and has no target. It becomes a Captured Zombified Piglin item. Babies work too.
- Mini piglin item: the item shows the real piglin in small size, with its baby size, weapon and armor. A named piglin gives the item its name. Renaming the item in an anvil names the piglin.
- Set it free: right click a block. You get back exactly the piglin you put in: name, baby or adult, weapon, armor. Picked-up items still drop for sure. Released piglins do not despawn.
- Gold Farm block: right click with a captured piglin puts one in, sneak + right click puts in as many as fit. Sneak + right click with an empty hand takes one out again. Every piglin walks around in the glass as a mini piglin and looks at you when you come close.
- Sword: the farm only runs with a sword in its sword slot, and the piglins walk around freely until it comes. Each cycle your sword sweeps once through the glass and all piglins die together, then new ones pop up. It shows your sword with its glint and never wears out.
- Looting: +25 % loot per level, and a fountain of nuggets.
- Sharpness or Smite: 10 % shorter cycles per level (level V halves them), with magic sparks.
- Fire Aspect: the piglins burn as they fall. Knockback: they fly outwards. Sweeping Edge: bigger sweeps.
- Between cycles the sword stands stuck in a corner of the gold floor.
- Output: right click with an empty hand opens 27 output slots. The screen shows tier, piglins, time to the next cycle, and if the farm is slowed. Hoppers can pull from below. Nothing goes in from any side.
- Never loses items: if the loot of a cycle does not fit completely, the farm waits. Breaking the farm keeps tier, piglins and loot in the item (also in creative), like a shulker box.
- Server side: only the server runs cycles, only in loaded chunks.
- Five tiers: Stone, Iron, Gold, Diamond, Netherite. Upgrade one step at a time with upgrade items. Piglins and loot stay inside. The crown on top shows the tier color.
- Nether bonus: full speed in the Nether, half speed everywhere else (configurable).
- Advancements in the Nether tab: Pocket Piglin, Gold Rush in a Box, Bastion of Gold.
- English and German.
Recipes
Gold Farm (crafting table)
Glass Glass Glass
Glass Gold Ingot Glass
Stone Hopper Stone
Upgrades (crafting table, pattern corners / sides / middle)
| Upgrade | Corners | Sides | Middle |
|---|---|---|---|
| Iron | Iron Ingot | Gold Ingot | Block of Iron |
| Gold | Block of Gold | Gold Ingot | Block of Gold |
| Diamond | Diamond | Block of Gold | Block of Diamond |
Netherite Upgrade (smithing table): Netherite Upgrade Smithing Template + Diamond Upgrade + Netherite Ingot.
All recipes are data files and can be changed with a datapack.
Tiers (defaults)
| Tier | Max piglins | Cycle in the Nether | Cycle elsewhere |
|---|---|---|---|
| Stone | 2 | 60 s | 120 s |
| Iron | 4 | 45 s | 90 s |
| Gold | 8 | 30 s | 60 s |
| Diamond | 16 | 20 s | 40 s |
| Netherite | 32 | 10 s | 20 s |
Loot per cycle and piglin
From the loot table data/goldfarm/loot_table/gameplay/gold_farm.json (replace it with a datapack):
- Gold Nugget: 1–2
- Rotten Flesh: 0–2
- Gold Ingot: 5 %
- Golden Sword: 1 %, random durability, no enchantments
Config
config/goldfarm.json, created on first start. Invalid values fall back to the default and print a warning in the log.
| Key | Default | Meaning |
|---|---|---|
configVersion |
2 | Set by the mod, do not change |
piglinStackSize |
16 | Captured piglins per stack (1–99) |
outsideNetherFactor |
2.0 | Cycles take this many times as long outside the Nether (at least 1) |
lootingBonus |
0.25 | Extra loot per Looting level of the sword (at least 0) |
sharpnessSpeedup |
0.10 | Shorter cycles per Sharpness or Smite level (0–0.18) |
tiers.<tier>.maxPiglins |
2 / 4 / 8 / 16 / 32 | Piglins per farm (1–256) |
tiers.<tier>.cycleSeconds |
60 / 45 / 30 / 20 / 10 | Seconds between two cycles in the Nether (at least 1) |
<tier> is stone, iron, gold, diamond or netherite.
License
MIT

