When I die, how much of the experience I have gained is made into orbs?
I died, but very near my spawn point. When I came back to the point where I'd died (I fell to my death) there was my stuff spread around, as well as loads of experience orbs! I don't know how much I had before I died, so is the amount I just picked up:
- The exact amount I had before I died?
- Some random/fixed portion of that amount?
- Fixed?
It appears the amount of experience lost upon dying is approximately the same as the amount of orbs that gets dropped.
Upon the player's death, a number of Experience Orbs are dropped at the location of death. … The number of orbs that are reclaimed is about the same number as the amount lost. - MC Wiki
Upon testing it myself, it seems the experience dropped isn't equal to the experience you had before you died. After running three tests, I usually got about 1/2 of the experience I had before I died.
This image contains three tests: the experience meter before is on top and the experience bar after is below. Also, in the third test, I had an entire bar of experience plus what is shown.
The Minecraft Wiki is quite detailed about experience points and experience levels. This may not have been the case at the time the previous answer and comments were written.
https://minecraft.gamepedia.com/Experience
"When the player dies, they drop experience orbs worth 7 * current level experience points, up to a maximum of 100 points (enough to reach level 7). All the other experience vanishes."
Yeah, I've died with about 900 levels and I only got 7 back.