Minecraft Wiki
Advertisement
Hunger

XP bar visible above hotbar

ExcessiveExperienceOrbs

An example of the excessive amount of experience orbs dropped upon death in 1.8, causing extreme performance drops.

Experience points were added to Minecraft during the first part of the Adventure Update. They were originally revealed by Jeb during an interview.[1] Experience can be obtained by gathering Experience Orbs from defeated mobs and players. Experience is used for Enchanting.

Behaviour

Gathering experience points increases the player's experience level by gradually filling a bar on the bottom of the screen until a new level is achieved when the bar is full. Each level up will potentially reward the player with Skill Points,[2] which Notch has said may be used for buying things such as increased jump height and increased maximum health.[3]

Experience Orbs will not drop unless the mob is killed by a player or damaged by the player and then can be killed by other means; therefore ordinary mob grinders cannot be used for farming experience (although grinders can be designed to funnel monsters to a holding location, and wear them down to one-hit kills). Experience orbs will "float" or glide toward the player if they are 2-3 blocks away.

When the player dies, they only drop half of their experience as orbs, rounded down to the nearest point. The other half vanishes.

Mobs will drop a random number of orbs, and the orbs can have different values. However, the total value will always remain within these values, regardless of difficulty setting:

Mob Experience
Passive [note A 1] 1 - 3
Baby Animals 0
Villager 0
Wolf 1 - 3
Hostile [note A 2] 5
Snow Golem 0
Big Slime [note A 3] 4
Small Slime [note A 3] 2
Tiny Slime [note A 3] 1
Blaze 10
Ender Dragon 20,000
  1. Excludes NPC Villagers and baby animals.
  2. Includes Zombie Pigmen and Endermen. Does not include Blaze, Slimes or Magma Cubes.
  3. a b c This also applies to Magma Cubes of the same size. Experience is dropped per slime/cube death. Further, smaller slimes/cubes will also drop experience.

Leveling Up

The following values are only approximations 
Please note that the following information and algorithms have been extracted from tests ingame, rather than from the source code, and are only estimations
Level XP required
[note B 1]
XP diff
[note B 2]
Bar Section
[note B 3]
0 0 0 0.39
1 7 7 1.17
2 21 14 2.33
3 42 21 3.89
4 70 28 5.83
5 105 35 8.17
6 147 42 10.89
7 196 49 14
8 252 56 17.5
9 315 63 21.38
  1. The total amount of experience required to attain the level from level 0
  2. The experience required to obtain this level from the previous level
  3. The XP value of each of the 18 sections of the XP bar at said level. Because the experience needed to gain the next level is usually not evenly divisible by 18, this is an approximation.



For any given level, the experience, E, required to achieve the next level n+1 from the current level, n is:

E = (n + 1) * 7

The experience, E, required to achieve level n from level 0 is:

E = 3.5 * n * (n + 1)

Also, to reach level x from level n, one would need E experience:

E = 3.5(x(x + 1) - n(n + 1))



For any given experience E the matching level n is:

n = (E / 3.5 + 0.25)0.5 - 0.5

Also, the level x you would reach with a certain amount of experience E from level n would be:

x = (E / 2.5 + n(n + 1) + 0.25)0.5 - 0.5

History

Jeb released a picture of the 1.8 GUI list, which shows the experience bar, among other things.

When first added in Beta 1.8, there was no measurable benefit to gaining Experience Orbs and levels.

As of 1.9 prerelease 3, experience levels are indicated by a number above the experience bar, which increases by one every time the bar is filled.

The ability to spend experience levels for Enchanting items was added in 1.9 Pre-release 3, and enchantment was enabled in SMP in 1.9 Pre-release 4.

Farming Experience Orbs

Experience orbs are very useful for they can enchant tools and armor. Experience orb farming is a good way to get experience orbs. Usually it will consist of a monster spawner, and a way to damage the monsters to only 9 1/2 hearts, making it easy for the player to kill the monster and get the orbs.

Trivia

  • In Beta 1.8 Pre-release 1, when the player died, they dropped all of their experience orbs individually. This created a problem with retrieval of drops if the player had accumulated a large sum of experience, due to the extremely large amount of orb items created at the specific point. On SMP servers, this could be enough to even crash a server.
  • In Beta 1.9 Pre-release 1, the player gained Experience from jumping. This was part of code left in by Jeb for testing Experience.[4]
  • Experience levels have quadratic scaling, meaning that it becomes progressively harder to achieve higher and higher levels.
  • Experience orbs will drop from a mob if it dies from fall damage as a result of the player knocking it off a cliff.
  • To reach level 50, which is the amount of skill points required to purchase the highest type of enchantment, one would need to gather 8925 experience by defeating 1785 hostile mobs.
  • Experience orbs will despawn if a player sleeps before collecting them. This means if you die at night and sleep before collecting your items, the orbs will disappear when you wake up.
  • Using enchantments does not decrease your score (which is shown on death).
  • In the resources folder of Minecraft, there appears to be a unused sound of leveling up. It cannot be heard in gameplay.

Bugs

  • Currently, as of 1.0, there is a bug where gathering many XP orbs at once allows you to gain a number of XP levels equal to the number of orbs collected divided by the amount of required to gain the next level. Example: Gaining 350 experience while at level 0 will raise the player to level 50, since 7 XP is required to go from level 0 to level 1. This is most easily seen using the /XP <player> <XP> command on a server.
  • When a 1.9 Pre-release 2 world is opened on a 1.9 Pre-release 3 version of Minecraft, the player is given a large amount of experience and the skill bar will look strange.
    File:Skillbarbug.png

    An example of a bug on the skill bar

  • In Beta 1.8, if the player dies with an large amount of experience, and returns to collect it after respawning, sometimes (usually if FPS drop below 10) the experience orbs will continuously swirl around them. The experience points count on the bar, but the animation continues to loop. The only known way to fix this bug is disconnecting then reconnecting.
  • In Beta 1.9 Pre-release 4, Enchanting only consumes experience levels, not the experience itself. So, if the player spends 10 points on an enchantment, and then dies, the points can be regained after respawning.
  • In Minecraft 1.0.0, Experience is not always rewarded after killing an animal/mob/player, this may be due to effects such as "Fire Effect" for swords which do additional damage and that damage may not be attributed to you. Animals/mobs should give experience 100% of the time if you use a standard sword and the killing blow is yours.

References

Advertisement