Villagers are the most important thing you will need to advance quickly. Once a villager finds a job site block and converts to that type of villager they will lose that type if you go 128 blocks away or if the job site block is destroyed. To lock the trade in so neither of these things reset it just trade once with the villager.

Needed items

Villager Breeder

Once you find a village, first make a villager breeder perhaps using one of the village farm plots. You will need a water source, torches or other light source, potatoes or carrots, 2 farmer villagers, 3 beds, and 2 trap doors.

Iron Farm

Next you will want to make an iron farm to level up your toolsmiths, weaponsmiths, and armorers. You will need 3 villagers, 3 beds, 3 slabs, and a zombie.

Food (Golden Carrots from a Farmer Villager)

I used to use an auto cooking cow farm but golden carrots from a farmer villager are a better solution. Level up a farmer (composter) villager so you can get golden carrots as a food source. 1 emerald for 3 once you cure one. A farmer villager trades 1 emerald for either 20 wheat (2XP), 26 potatoes (2XP), 22 carrots (2XP), 15 beetroot (2XP). Since potatoes and carrots yield 2-5 each harvest (more if using a Fortune tool) and wheat and beetroot only produce 1 despite (no bonus for a fortune tool), carrots and potatoes grown in rows are the optimal trades. Crop growth is significantly increase if you alternate crops in rows and if you place beehives on one side of the farm and flowers on the other as bees drop pollen particles that increment the growth stage. Most crops reach maturity within 31 minutes (1.5 minecraft days) if planted in rows in hydrated soil which is half the non-row time to maturity. Not sure how much the pollen increases it beyond that. You will also want to grow pumpkins (6 at 10XP each) and melons (4 at 20XP each) to increase the farmer villager's experience faster as it levels up. You could also build an automatic farm to supply you with carrots that has 4 fields with farmer villagers in it who throw carrots to a central villager that has hoppers underneth him to pickup the thrown food. There is a 100% chance to find a bee nest in a Meadow biome, 5% for Cherry Grove, Plains, Sunflower plains, Mangrove Swamp, 2% in Flower Forest, and 0.2% in Forest, Birch Forest, Old growth birch forest. To manually generate a bee nest: oak, birch, mangrove, or cherry trees grown from saplings that are within 2 blocks (including diagonally) of a flower on the same y-level have a 5% chance to grow with a bee nest containing 1-3 bees.

Smelting and Cooking Using Renewable Lava Buckets via Pointed Dripstone

Blast furnaces and smokers smelt and cook twice as fast as a regular furnace. The ideal fuel is a lava bucket which is renewable if you have pointed dripstone and renews on average in 19 minutes (about 1 minecraft day). The setup is: a lava source block, a non-flammable block, the pointed dripstone, and a cauldron to catch the drips. Pointed dripstone can be found in some caves or sometimes offered by a wandering trader (12.2% chance).

Toolsmith, Weaponsmith, Armorers, and Librarians

Then you will want to start making toolsmiths (smithing table) for pickaxes, shovels, axes, weaponsmiths (grindstone) for swords and axes, armorers (blast furnace) a single armorer can supply helmets, chestplates, leggings, and boots, and librarian villagers. You can get up to level 3 enchantments on items from villagers so it is best to seek Unbreaking 3 on your diamond items. You will need coal (15 at 2XP each) and iron (4 at 10XP each) and sugarcane for paper paper to level up the librarian as well as for books for trading and as part of the lecturn recipe. You can either place the lecturn down in front of a villager and then chop it with an axe if it has a book selling for more than 21 emeralds (so when it is cured it will only be 1 emerald) or you can put it on a piston and toggle a lever to reset the trades if you want to save axe durability and some time. If a villager does not accept a job site it may be night time or there may be some issue with another villager accepting the job block so seal off the job site from other villagers.

Books of any enchantment type and level can be sold by Librarian villagers so Mending has the same chance as Efficiency 5. After a curing, non-regular items like tools, weapons, armor, books are discounted by 20 emeralds so a level 5 trade at 64 only goes down to 44 but a level 5 trade at 21 or less goes down to 1.

Level Emeralds Chance to sell for 21 emeralds or less
1 5-19 (10-38 for treasure enchantments)* 100% (25% for treasure enchantments)*
2 8-32 58.5%
3 11-45 32.3%
4 14-58 18.2%
5 17-64** 9.2%**

* For treasure enchantments such as Mending, Frost Walker, Soul Speed (which is a treasure enchantment but is not available by Librarians), Curse of Binding, Curse of Vanishing the cost is doubled so 10-38 or a 25% chance of getting one being 21 or less.

** Actual range is 17-71 but capped at 64.

Curing Villagers

In order to make the trades affordable (usually 1 emerald) you will want to cure the villagers. The chance for a zombie to convert a villager into a zombie villager is 100% for Hard difficulty, 50% for Normal, and 0% for Easy meaning in Easy difficulty you will have to pay full price for enchantments. As of 1.20.2 villagers no longer offer additional permanent discounts if cured more than once but can apparently be cured up to 8 times for temporary discounts. After a curing non-special items such as coal, paper, potatoes are reduced by 5 emeralds while special items such as tools, weapons, armor, books are discounted by 20 emeralds. Once villagers are attacked by a zombie they will turn into zombie villagers and you have 3 options to cure them. They need to be weakened and then right clicked on with a golden apple. Witches throw potions of weakness at you but they have to be within a certain distance or they will throw poison so this can be hazardous. Another way is to get a fletcher villager who sells arrows of weakness (2.7% chance). The most common way requires building a portal, entering the nether, finding a nether fortress, and killing blazes to get blaze rods so you can make and use a brewing stand to make splash potions of weakness. Brewing stands can sometimes be found in villages as well.

Brewing Splash Potions of Weakness

Find a brown mushroom in a swamp or the nether, turn some sugarcane into sugar, and kill a spider to get its eye. Then make a fermented spider eye. Turn a blaze rod into blaze powder and put that into a brewing stand along with the fermented spider eye and 3 glass bottles filled with water (right click them on a water source). Put the blaze rod in the brewing stand along with the 3 glass bottles and put the fermented spider eye in the top. To turn it into a splash potion brew it again with gunpowder. You can throw a splash potion of weakness into a spot with 4 zombie villagers in minecarts and cure them all at once. Make sure you stand nearby because they revert at different times (3-5 minutes) and the zombie ones will target the cured villagers unless they have line of sight on you.

Applying Enchantments In Order

To get all the enchantments onto a sword before it reaches a cap you need to combine books rather than applying them all directly. The enchantment calculator allows you to optimize your enchantments for least number of levels required.

PvP Sword: 44 levels
Levels Item 1 Item 2
6 Sword + Looting 3
4 Sweeping Edge 3 + Fire Aspect 2
12 Sword + Combined book
3 Sharpness 5 + Unbreaking 3
3 Combined book + Mending
16 Sword + Combined book
PvE Sword: 49 levels
Levels Item 1 Item 2
6 Sword + Looting 3
3 Sweeping Edge 3 + Unbreaking 3
11 Sword + Combined book
2 Sharpness 5 + Mending
11 Sword + Combined book
2 Fire Aspect 2 + Knockback 2
14 Sword + Combined book
Boots: 30 levels
Levels Item 1 Item 2
6 Boots + Depth Strider 3
3 Feather Falling 4 + Unbreaking 3
9 Boots + Combined book
2 Protection 4 + Mending
10 Boots + Combined book
Helmet: 27 levels
Levels Item 1 Item 2
6 Helmet + Respiration 3
2 Protection 4 + Mending
8 Helmet + Combined book
2 Unbreaking 3 + Aqua Affinity
9 Helmet + Combined book
Leggings: 13 levels
Levels Item 1 Item 2
4 Leggings + Protection 4
2 Unbreaking 3 + Mending
7 Leggings + Combined book
Bow: 26 levels
Levels Item 1 Item 2
5 Bow + Power 5
2 Punch 2 + Mending
8 Bow + Combined book
2 Unbreaking 3 + Flame
9 Bow + Combined book
Fortune Pickaxe: 23 levels
Levels Item 1 Item 2
6 Pickaxe + Fortune 3
2 Unbreaking 3 + Mending
7 Pickaxe + Combined book
8 Pickaxe + Efficiency 5
Silk Touch Pickaxe: 21 levels
Levels Item 1 Item 2
5 Pickaxe + Efficiency 5
2 Unbreaking 3 + Mending
7 Pickaxe + Combined book
7 Pickaxe + Silk Touch

How Protection Works

The Protection enchantment reduces damage taken from all damage types but only gives you 64% reduction with Protection 4 on 4 armor pieces and 48% if using an Elytra and Protection 4 on 3 armor pieces. If you switch out one piece of Protection 4 armor with another type you can get 80% protection for that damage type but at the cost of only 48% protection for other damage types. Thorns, Soul Speed, and Frost Walker are usually kept off armor since they reduce armor durability each activation.

Armor Enchantments Projectile Protection Damage Reduction Fire Protection Damage Reduction Blast Protection Damage Reduction
4x Protection 4 64% 64% 64%
3x Protection 4 + 1x Projectile Protection 4 80% 48% 48%
3x Protection 4 + 1x Fire Protection 4 48% 80% 48%
3x Protection 4 + 1x Blast Protection 4 48% 48% 80%

Vendors vs Enchanting Table

Feather Falling 4 is strange in that 30 levels gives you less of a chance to get it than lower levels like 22-23. There is a 0% chance to get Efficiency 5 with a Diamond Piackaxe and a 7% chance with Netherite and the differences in percentage chance to get a particular enchantment are only a few percent so there is not much benefit to waiting to upgrade your diamond stuff to netherite before enchanting with the enchantment table.

Efficiency 5 at 30 XP levels Efficiency 4 at 30 XP levels Fortune 3 at 30 XP levels Unbreaking 3 at 30 XP levels Silk Touch at 30 XP levels
Diamond Pickaxe 0% 68.3% 21% 61% 20.1%
Netherite Pickaxe 7% 73% 26.1% 62.3% 20.8%

Sharpness 5 at 30 XP levels Sharpness 4 at 30 XP levels Looting 3 at 30 XP levels Unbreaking 3 at 30 XP levels Sweeping Edge 3 at 30 XP levels Fire Aspect 2 at 30 XP levels Knockback 2 at 30 XP levels
Diamond Sword 0% 16.3% 9.6% 35.5% 15.4% 15% 35.6%
Netherite Sword 0% 22.7% 12.1% 36.5% 15.7% 16.2% 35.4%

Feather Falling 4 at 22 XP levels Feather Falling 4 at 23 XP levels Feather Falling 4 at 30 XP levels Depth Strider 3 at 30 XP levels Unbreaking 3 at 30 XP levels Protection 4 at 30 XP levels
Diamond Boots 32% 34.1% 2.7% 38.8% 61.4% 21.2%
Netherite Boots 34% 32.2% 1.6% 39.8% 63.4% 21.3%

Aqua Affinity at 30 XP levels Respiration 3 at 30 XP levels Unbreaking 3 at 30 XP levels Protection 4 at 30 XP levels
Diamond Helmet 28.4% 26.8% 53% 20.3%
Netherite Helmet 29.5% 28.5% 54.6% 28.4%

Netherite

A netherite pickaxe has 2031 durability vs 1561 for diamond and 7 damage vs 6. A netherite sword does 8 damage vs 7 for diamond. Netherite in item form does not burn in lava. A netherite sword with Sharpness 5 does 11 damage. A netherite axe does 10 damage vs 9 for diamond but it has a longer cooldown so the damage per second is less although the benefit of an axe is it can temporarily disable a player's shield in PvP. Netherite armor does not give any defense increase over diamond, just a 10% durability increase and a 10% reduced knockback.

Mob Fall Distance

Many mob grinders require that you calculate how far a mob can fall to get them to 1HP. Fall damage = # blocks - 3 (1HP = 1/2 a heart) so subtract 1 from the mob's health and add 3.

Mob Fall Distance to 1HP
Wither Skeleton 22
Skeleton 22
Zombie 22
Pillager 26
Evoker 26
Vindicator 26
Witch 28
Guardian 32
Enderman 42

Endportal Stronghold Triangulation

Make some eyes of ender with blaze powder and ender eyes because they have a 20% chance of breaking each use and throw one. It will fly up and out 12 blocks so do it in an open area. Look at it with your screen recticle and press F3+C to copy your location and facing direction to the clipboard. Use the Stronghold Locator and paste it into the notepad on the side. You might need to zoom out. It has various color options like #Blue or #Red you can specify to colorize the path if you put them before the pasted text. Turn 90 degrees from the direction your eye of ender flew and run a thousand blocks or so and throw another. F3+C and paste into the tool and this will give you two rays and where they cross is the stronghold.

Hotkeys and Game Settings

F3+G displays chunk borders. F3+H shows item durability. F3+B shows hitboxes which is useful to see items, players, and mobs easier. I also recommend going into the game settings and setting item Entity Distance to 500% since by default you cannot see items farther than 18 blocks away. Turn off auto-jump and turn on subtitles so you can see footsteps approaching or monsters underground. Since version 1.19 editing the options.txt file to set your gamma to 1000 so caves are bright requires more work. As of 1.19 the game resets gamma to 1.0 every time it launches. You could change the file to read only, set gamma to 1000, start up minecraft, then change it back to read/write though to bypass this.