Tutorials/Experience farming

Experience is a tricky resource: It is needed for enchanting, combining and repairing items, and for fueling the Mending enchantment. Many desired jobs require large amounts of experience -- but it can take quite a while to accumulate a high experience level, and when the player dies, they lose essentially all of their current stock. Accordingly, many players will resort to "experience farming" -- arranging a situation where they can pick up large amounts of experience when desired. These fall into several categories, reflecting the many sources of experience, but most of them can be considered in terms of experience during time -- either active or AFK time, with the player involved, or "accumulation" time before collecting the results.

Consulting the Experience page, we can see several common "target values" for desired experience payouts:


 * Enchanting max: To get from level 0 to level 30 requires 1395 experience.
 * Anvil max: To get from level 0 to level 39 requires 2727 experience.
 * Recovering after a max-power enchantment: to get from level 27 to level 30 requires 306 experience.

Fishing
Fishing can function as a slow experience farm. Once you have built a "god rod" (Lure III, Unbreaking III, Mending, and ideally Luck of The Sea III), and set up a secure fishing pond, fishing is effectively free, and yields a steady stream of experience and other resources. With these enchantments and while fishing outdoors, each minute you will make an average of 8 catches, bearing experience orbs worth a total of 28 XP. Any Mending equipment worn may take 1 XP from each orb, perhaps reducing the total as low as 20 XP. The rod itself will average 1 damage per four catches on average, and if it only has one point of damage it will repair that for free! If multiple items are being mended, the rod may take a second point of damage before it mends, and then take an XP for its next mending. Mending will affect any armor worn and the rod, but an additional item can be included by placing it in the off-hand. Total yield is thus 400 XP/game day (1200/real-time hour) if items are being mended, or 560/day (1680/hour).

Fishing under rain will add 25% to the yield (wait time is 20% less), for a potential of 25-35 XP/minute as long as the rain lasts.

Aside from the basic experience for catching items, there are a couple of "side hustles" that can yield extra experience: Cod or Salmon can be smelted (22.4 XP/stack)   Any magic items (bows, rods, books) not kept for your own use can be fed to a grindstone for extra experience.

This is also a good way to while away rainy days and storms, when exploring may be unpleasant or dangerous, but AFK fish farms can also be constructed for reduced boredom.

Trading
Trading gives some experience itself, but can also can be farmed to accumulate many emeralds, and these in turn can be used to purchase Bottles o' Enchanting. While fairly expensive for the experience gained, these are truly portable, and can be used to top up your experience to reach any desired level. The bottles average a yield of 7 XP each, so a stack of them will yield around 448 XP.

A variety of crops can be sold to farmers, wood can be converted to sticks and sold to fletchers, and various farm-surplus items can be sold around the village -- e.g., rotten flesh from a mob farm to clerics, feathers to a fletcher, iron from an iron farm to the various blacksmiths. Each trade will also grant an average of 4.5 XP to the player, 5 extra if the villager would be willing to breed. Note that this applies both to buying the bottles, and to selling the goods to gain emeralds, so rather more experience will be gained in the trading than stored in the bottles!

Mob farms

 * A mob farm can be built to let players finish off the mobs themselves, thus gaining the experience from the kills. While most of these will be oriented toward hostile mobs (Blazes have especially high experience values), chickens can also be automatically hatched into an enclosure for convenient slaughtering.  Several monsters (zombies, skeletons, zombified piglins) will also provide enchanted equipment, which can be disenchanted at a grindstone for yet more experience.  Naturally, such a farm will also provide the drops for the particular mobs, in quantity.

Smelters

 * An automatic smelter can be fed with the harvest from any of several automatic crop farms, and the resulting experience harvested when you need it. The most useful crops here are kelp, potatoes and cactus, as all of these can be farmed automatically.  Chickens are also an option, as they can be automatically bred and killed to produce a stream of chicken meat, but for any given number of chickens, more experience can be had by manually slaughtering them. Fuel can be provided by the player in quantity, but it is even possible to fuel the farm with an automatic bamboo farm, or with an automatic charcoal smelter, perhaps fed by a tree farm.  For large smelter farms, the load can be divided among several furnaces, which can be harvested separately.  Depending on the crop in use, the smelter output may be useful:  Dried kelp can be crafted into fuel blocks, which can then be used to fuel the smelter itself; cooked potatoes can be eaten or composted, for better value than raw potatoes; Green dye, however, is useful only as a dye, and you will need to make arrangements to destroy the excess accumulations.