Minecraft wiki entry for Experience, associated text: If a player kills a mob by firing potions out of a dispenser, no experience is dropped.
Using experience on enchanting or repairing does not decrease the score which is shown upon death.
If the player gains too many experience points, such as 1 trillion, the experience bar and level counter completely disappear from the HUD. This appears to occur around level 32,767 or 215−1, the largest value representable by a 16-bit signed integer.[10]
The maximum XP that can be gained from the /experience command is 2,147,483,647 levels or 231−1, the largest value representable by a 32-bit signed integer and by Java's int type.
The maximum level is 238,609,311 before the experience bar disappears altogether.
A special XP sound plays each time the player reaches a level that is a multiple of 5.
Despite being widely dropped by mobs and blocks and being obtainable from fishing, experience orbs cannot be configured using loot tables.
The texture file for experience orbs contains an additional five orb sprites which are all identical to the size 3 sprite. Their purpose is unknown; it is likely that they are just placeholder sprites in the texture.