Minecraft wiki entry for Command_blocks_and_functions, associated text: The part labeled "Buy" is what the villager is accepting as payment, the part that says "sell" is what he's giving in return. You can change the maxUses to 1000 if you never want the offer to run out, or to 1 if you want to make it a one-of-a-kind item. Note that the first item there (the gold sword) has an out of range enchantment (sharpness 9). Yes this works, but always research what exactly the enchantment does before making an out of range one as some stuff does nothing or even does negative effects (respiration's "see underwater" side effect makes everything a blinding white at high levels, as if you dove into slush-filled arctic waters). As for that gold sword, keep in mind that gold swords wear out insanely fast (there's a reason people call them butter swords after all). A level 10 Unbreaking enchantment should bring a gold sword up to a decent durability level. Also notice that the other 2 "weapons" are actually a Stick and a Blaze Rod with weapon enchantments on them. Using any non-weapon as a weapon does the same damage as an empty hand (1 damage, aka half a heart) but the enchantments on these ones make them the equal of an unenchanted sword. The advantage is that sticks, blaze rods, or other items is that you can use it infinitely. The same trick can be used with mob heads and respiration 3 to make an infinite durability scuba mask.