If Endermen take any form of environmental damage (fire, water/rain), they teleport away and lose all interest in everyone who might have hit them before. so if you hit them with a fire sword, they will start burning and immediately teleport randomly for a few times until the fire goes out. If no environmental damage is dealt, they will pursuit you until they kill you or you run out of range.
Enderman as well have the habit to stand still then teleport if you stare into their eyes then lose contact. This can cause them to teleport around frequently during battle, so try to look down at their feet. In addition the teleport is in all directions, so they could be above you or below you in a cave after a teleport, unable to reach you until you get out of range.
The easiest way to kill an Enderman is to use their size against them. Build a 3x3 ceiling at 2 blocks height so that you barely fit under it. Then pull an Enderman to this location and he will keep running against the ceiling, unable to hit you and unable to look at you, while you can easily finish him off. You can as well use natural ceilings (leaves, rocks) at the same height instead of building one. Use a looting sword for increased chance to drop.
If you have any form of teleportation mod installed, you can do the same in the End world, which will thanks to the huge amount of Enderman gain you pearls very quickly. If the dragon is still alive, things get a lot more difficult. Then you need to find a location where the dragon is out of range. In some End worlds this is possible, in others the island is just too small for that.
Mending is a treasure enchantment, which you can only find in the world, you can not create it yourself on an enchanting table.
Treasure enchantments can be obtained by
- Fishing
- Chests in dungeons, temples, mineshafts, End cities etc.
- Trading (villagers charge double price for treasure enchantments)
Mending can be found on many items, including, for example, Fishing Rods.
Sources: 1.9 changelog, enchantment mechanics, trading pages.
Best Answer
It is not predictable what enchantments you will get but at certain enchantment levels, you will get some enchantments with a higher probability. This chart shows the probability for diamond tools:
If you want to have a certain enchantment on your item, I would recommend checking out this enchantment calculator: Minecraft Enchantment Calculator or a list of precalculated probabilities
Also, the Minecraft Wiki can give you the algorithm Minecraft uses for calculating enchantments. It is pretty complex and you really don't need to get into it, but it is definitely interesting: How Enchantments Are Chosen