Experience

Revision as of 19:39, 5 January 2019 by Dinoguy1000 (talk | contribs) (Undo revision 1301583 by 86.97.119.105 (talk) - I don't think that's necessary)

Experience (EXP or XP for short) can be obtained by gathering experience orbs from mining, defeated mobs and players, breeding, fishing, and using furnaces. As tradition, experience points accumulate into experience levels. However, unlike many games, experience levels do not directly increase the character's abilities. Instead, experience is used for enchanting and anvils, to produce weapons, armor, and tools with various useful abilities.

Experience
Experience Orb.gif: Infobox image for Experience the entity in Minecraft
"xp" redirects here. For the command, see Commands § xp.
XP bar visible above hotbar.

Behavior

Most experience comes in the form of experience orbs, small green and yellow spheres that move toward the player and will automatically be added to their total when collected. Experience orbs cannot be added to the player's inventory.

Gathering experience points from experience orbs 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. 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.

Experience can be gained from several different sources:

  • From killing monsters, which drop experience orbs along with any other items.
    • A mob will not drop experience unless it dies within five seconds (100 game ticks) of an attack registered as a player hit (including tamed wolves and TNT). This allows gaining experience from, say, knocking a monster off a cliff (fetching the orbs might be another question). You can also try to "claim" a burning monster by hitting or shooting it once—even if the blow doesn't kill it, if the fire does within 5 seconds, it will drop XP. (5 seconds of fire only does 5HP♥♥♥ damage, but of course you can keep trying.)
    • Mobs killed by TNT activated by a player using flint and steel will drop XP as usual; however mobs killed by TNT that was activated by fire, redstone, or an explosion that wasn't player activated don't drop any experience.
    • Mobs will drop a random number of orbs, and the orbs can have different values. However, the total value will always remain within the values given below, regardless of difficulty setting.
    • Hostile mobs give more experience than passive ones. Baby animals, bats, golems, and villagers give no experience at all. The ender dragon gives orbs totalling 12,000 XP the first time a player kills her – over 200 times more than anything else in the game – and 500 XP the next times.
      • Some hostile mobs spawn with weapons, or can spawn with weapons and/or armor. These mobs give an extra 1–3 points (randomly) per piece of equipment that they spawned with. Equipment picked up after spawning doesn't count.
    • Mining (destroying) a spawner block gives 15–43 points of experience as orbs.
  • From mining any ore that drops a resource, rather than ore. The orbs are produced along with the mineral item(s). If a Silk Touch pick is used to mine the ore block, the experience is not dropped, but the block can later be placed and mined normally to release the mineral and the experience.
    • The ore will still produce orbs if destroyed by an explosion, whether or not it was caused by player activated TNT.
  • From smelting any of various items.
    • Smelting any ore yields some experience, but normally only iron and gold are worthwhile. For all other ores, mining them is better.
    • Moderate amounts are gained by smelting/cooking other materials: food, clay balls or blocks, cactus, wood logs, sand, or cobblestone.
    • The smelted material must be taken from the furnace through its GUI window. If you use a hopper to unload the furnace, it is possible to retrieve all experience produced by the furnace by smelting an extra item and taking it from the GUI. Dumping the contents by breaking the furnace destroys the experience.
  • From breeding animals, which produces orbs where the parents are, along with the baby animal. Breaking eggs does not give experience.
  • From fishing. The experience is awarded immediately upon reeling in the fish, even if the fish itself is not picked up.
  • From trading with villagers.
  • A bottle o' enchanting releases orbs when broken.
  • From the /xp command.

Experience orbs

Experience orbs fade between a green and yellow color and will "float" or glide toward the player up to a distance of 6 blocks, speeding up as they get nearer to the player. Experience orbs pulled towards a player are slowed by spider webs. Experience orbs can also be pulled around or away from the player by running water currents.

When collected, experience orbs make a Christmas bell-like sound for a split second. Unlike resources, experience points are picked up gradually: no matter how many orbs are in range of the player, they will be added to the player's experience one at a time (around 10 orbs/second). In extreme cases, this can result in the player being followed by a swarm of orbs for many seconds. If an experience orb isn't collected within 5 minutes of its appearance, it will disappear.

Experience orbs vary in value, but naturally spawned orbs will always have an integer value of 1–11, 17, 37, 73, 149, 307, 617, 1237, or theoretically 2477 (although currently no orbs with this value will spawn). Fishing, breeding, and trading drop a single orb with a random value in the appropriate range. Breaking blocks, killing mobs and players, smelting items, and bottles o' enchanting calculate their total experience amount and then split it into values of 1, 3, 7, 17, 37, 73, 149, 307, 617, 1237, and 2477. Higher values are chosen first, so for example a total value of 1000 would be dropped as orbs with values 617, 307, 73, and three 1s. Note that while the first Ender Dragon in a world drops 12,000 experience, it is dropped in 10 waves of 1000 and one of 2000, so no orbs of value 2477 are dropped.

The general worth of an orb is reflected by its size, with eleven possible sizes corresponding to values 1–2, 3–6, 7–16, 17–36, 37–72, 73–148, 149–306, 307–616, 617–1236, 1237–2476, and 2477 and up.

Experience orbs can be destroyed by fire, lava, explosions and cacti, and can trigger pressure plates and tripwires. Although mob drops spawn the instant the final blow is dealt to the mob, experience orbs do not until the mob entity disappears and the smoke appears. Experience orbs can also stop minecarts.

Experience amounts by source

Source [hide]Experience
Animals
Chicken, Cow, Cod (including salmon, pufferfish and tropical fish), Dolphin, Horse (including Donkey, Mule, and Undead types),
Mooshroom, Llama, Ocelot (Cat), Parrot, Pig, Polar Bear,
Sheep, Squid, Turtle, Rabbit, Wolf (Dog)[note 1]
1–3
Bat, all baby animals 0
Golems
Iron Golem, Snow Golem 0
Monsters
Cave Spider, Creeper, Drowned, Enderman, Ghast, Husk, Illusioner, Phantom,
Shulker, Silverfish, Skeleton, Spider, Stray, Vindicator, Witch,
Wither Skeleton, Zombie, Zombie Pigman
5 + 1–3 (per equipment)
Endermite, Vex 3
Large Slime and Magma Cube[note 2] 4
Small Slime and Magma Cube[note 2] 2
Tiny Slime and Magma Cube 1
Baby Zombie, Baby Zombie Pigman 12
Spider Jockey[note 3] 5 (skeleton) + 1–3 (per equipment) + 5 (spider)
Chicken Jockey[note 3] 12 (zombie) + 1–3 (per equipment) + 10 (chicken)
Blaze, Guardian, Elder Guardian[note 4], Evoker 10
PCs and NPCs
Player 7 per level, up to 100
Villager 0
Bosses
Ender Dragon 12,000 (500 if respawned with end crystals)
Wither 50
Elder Guardian[note 4] 10
Mining blocks
Coal Ore 0–2
Diamond Ore, Emerald Ore 3–7
Lapis Lazuli Ore, Nether Quartz Ore 2–5
Redstone Ore 1–5
Monster Spawner 15–43
Smelting/Cooking
Diamond Ore, Emerald Ore, Gold Ore 1
Iron Ore, Redstone Ore 0.7 [note 5]
File:BlockSprite clay-(block).pngClay, Potato, Raw Beef, Raw Chicken, Raw Cod,
Raw Mutton, Raw Porkchop, Raw Rabbit, Raw Salmon
0.35 [note 5]
File:ItemSprite clay.pngClay 0.3 [note 5]
Cactus, Lapis Lazuli Ore, Nether Quartz Ore 0.2 [note 5]
Wet Sponge, Wood 0.15 [note 5]
Chorus Fruit, Coal Ore, Cobblestone,
Dyed Terracotta, Netherrack, Sand, Stone Bricks
[[Sword|ItemSprite golden-sword.png: Sprite image for golden-sword in Minecraft Iron or Golden Sword]], [[Tools|ItemSprite iron-axe.png: Sprite image for iron-axe in Minecraft ItemSprite iron-shovel.png: Sprite image for iron-shovel in Minecraft ItemSprite iron-hoe.png: Sprite image for iron-hoe in Minecraft Iron Tools]], [[Tools|ItemSprite golden-axe.png: Sprite image for golden-axe in Minecraft ItemSprite golden-shovel.png: Sprite image for golden-shovel in Minecraft ItemSprite golden-hoe.png: Sprite image for golden-hoe in Minecraft Golden Tools]],
[[Armor|ItemSprite iron-chestplate.png: Sprite image for iron-chestplate in Minecraft ItemSprite iron-leggings.png: Sprite image for iron-leggings in Minecraft ItemSprite iron-boots.png: Sprite image for iron-boots in Minecraft Iron Armor]], [[Armor|ItemSprite golden-chestplate.png: Sprite image for golden-chestplate in Minecraft ItemSprite golden-leggings.png: Sprite image for golden-leggings in Minecraft ItemSprite golden-boots.png: Sprite image for golden-boots in Minecraft Golden Armor]], [[Armor|ItemSprite chainmail-chestplate.png: Sprite image for chainmail-chestplate in Minecraft ItemSprite chainmail-leggings.png: Sprite image for chainmail-leggings in Minecraft ItemSprite chainmail-boots.png: Sprite image for chainmail-boots in Minecraft Chain Armor]]
[[Horse Armor|ItemSprite golden-horse-armor.png: Sprite image for golden-horse-armor in Minecraft Iron or Golden Horse Armor]], Kelp
0.1 [note 5]
Completing Challenge advancements[Computer Edition only]
ItemSprite shulker-shell.png: Sprite image for shulker-shell in Minecraft Great View From Up Here, ItemSprite fire-charge.png: Sprite image for fire-charge in Minecraft Return to Sender, ItemSprite bow.png: Sprite image for bow in Minecraft Sniper Duel 50
ItemSprite apple.png: Sprite image for apple in Minecraft A Balanced Diet, ItemSprite milk-bucket.png: Sprite image for milk-bucket in Minecraft A Furious Cocktail, ItemSprite diamond-sword.png: Sprite image for diamond-sword in Minecraft Monsters Hunted,
ItemSprite diamond-hoe.png: Sprite image for diamond-hoe in Minecraft Serious Dedication, ItemSprite empty-map.png: Sprite image for empty-map in Minecraft Subspace Bubble, ItemSprite golden-carrot.png: Sprite image for golden-carrot in Minecraft Two By Two, ItemSprite ghast-tear.png: Sprite image for ghast-tear in Minecraft Uneasy Alliance
100
ItemSprite diamond-boots.png: Sprite image for diamond-boots in Minecraft Adventuring Time 500
ItemSprite bucket.png: Sprite image for bucket in Minecraft How Did We Get Here? 1,000
Other
Bottle o' Enchanting 3–11
Trading 3–6 (8–11 if the villagers
are willing to breed)
Breeding animals 1–7
Catching Fish 1–6
  1. Excludes baby animals.
  2. Jump up to: a b Experience is dropped when these mobs split or die. This means the larger ones may drop experience several times before being fully defeated.
  3. Jump up to: a b Jockeys consists of two mobs that move as one. Each part drops experience separately when it is defeated.
  4. Jump up to: a b Elder guardians are considered monsters in Java and Legacy Console Editions, while they are considered bosses in Bedrock Edition.
  5. Jump up to: a b c d e f For fractional values, first multiply this value by the number of smelted items removed from the furnace, then award the player the whole-number part, and if there is a fractional part remaining, this represents the chance of an additional experience point.
    • For example, when smelting 1 coal ore and removing the coal, the value is 0.1, so this grants a 10% chance of getting 1 experience point.
    • Or, when smelting 7 cobblestone and removing all 7 stone, the value is 0.1 * 7 = 0.7, so this grants 70% chance of getting 1 experience point.

Leveling up

Level Exp Exp from last
1 7 7
2 16 9
3 27 11
4 40 13
5 55 15
6 72 17
7 91 19
8 112 21
9 135 23
10 160 25
Level Exp Exp from last
11 187 27
12 216 29
13 247 31
14 280 33
15 315 35
16 352 37
17 394 42
18 441 47
19 493 52
20 550 57
Level Exp Exp from last
21 612 62
22 679 67
23 751 72
24 828 77
25 910 82
26 997 87
27 1089 92
28 1186 97
29 1288 102
30 1395 107
Level Exp Exp from last
31 1507 112
32 1628 121
33 1758 130
34 1897 139
35 2045 148
36 2202 157
37 2368 166
38 2543 175
39 2727 184
40 2920 193

<pLines Title="XP per level" colors=FF0000,00FF00 bgcolor=c0c0c0

       cubic=true plots=open grid=true gridcolor=FFFFFF box=true labels=true
       ymin=0 ymax=3000 ytitle=XP xtitle=Level size=850x300 legend>

XP required,XP diff 7,7 16,9 27,11 40,13 55,15 72,17 91,19 112,21 135,23 160,25 187,27 216,29 247,31 280,33 315,35 352,37 394,42 441,47 493,52 550,57 612,62 679,67 751,72 828,77 910,82 997,87 1089,92 1186,97 1288,102 1395,107 1507,112 1628,121 1758,130 1897,139 2045,148 2202,157 2368,166 2543,175 2727,184 2920,193 </pLines>

The formulas for figuring out how many experience orbs you need to get to the next level are as follows:

Experience Required = 2[Current Level] + 7 (for Current Level 0-15)
5[Current Level] - 38 (for Current Level 16-30)
9[Current Level] - 158 (for Current Level 31+)

One can determine how much experience has been collected to reach a level using the equations:

Total Experience = [Level]2 + 6[Level] (at levels 0-16)
2.5[Level]2 - 40.5[Level] + 360 (at levels 17-31)
4.5[Level]2 - 162.5[Level] + 2220 (at level 32+)

Useful numbers

  • Killing one large slime and all the slimes that split from it will yield from 12 to 28 experience, with an average of 19.
  • The maximum level required for enchanting is level 30, while the anvil will accept jobs up to level 39 (in creative mode the anvil limit is removed).
  • Level 16 is a quarter of the way to level 30, while level 22 is about halfway there. Level 30 in turn, is halfway to level 39.
  • Killing the ender dragon the first time will give approximately 68 XP levels. The ender dragon actually drops 10 waves of orbs worth a total of 1,000 experience points per wave, and another worth a total of 2,000. Taken separately, the smaller waves could take a player from zero to level 26, while the big wave would take a player from zero to level 34. The largest orb dropped will have a value of 1237 experience points, and can take a player from zero to level 28 all by itself.
  • Maximum experience value can be gained by /xp command is 2147483648 (which is 2^31. This is likely due to experience being stored as a signed Java-standard 32-bit integer.)
  • Maximum value for one orb used by /summon is 1277951
  • Maximum level of XP you can get legitimately is 21863, but you can get up to 2147483647 using commands, in this case the experience bar may disappear and reappear.

Score

Example of Score in Hardcore

Score is the number of experience the player has collected since their last death. This number is the total experience the player has collected, rather than the amount of experience they had upon death. When the player dies, the score is displayed on the death screen.

Trivia
  • Before Beta 1.9 Prerelease 2, the score read &e0.
    • This was caused by a error in which, the game renders color text. §e0 would render the text as 0, but shaded bright yellow. From Indev 0.31 (the version in which the precursor to experience, a score system, was removed after Survival Test) to this version, a bug arose where it would display &e0 instead, a common error when formatting color text in Minecraft (except on custom servers with the plugin to override this).

Data values

ID

Experience/ID

Entity data

See also: Chunk format

Experience orbs have entity data associated with them that contain various properties of the entity. Their entity ID is xp_orb.

  • [NBT Compound / JSON Object] Entity data
    • Tags common to all entities see Template:Nbt inherit/entity/template[show]
    • [Short] Age: The number of ticks the XP orb has been "untouched". After 6000 ticks (5 minutes) the orb despawns.
    • [Int] Count: The remaining number of times that the orb can be picked up. When the orb is picked up, the value decreases by 1. When multiple orbs are merged, their values are added up to result orb. When the value reaches 0, the orb is depleted.
    • [Short] Health: The health of XP orbs. XP orbs take damage from fire, lava, falling anvils, and explosions. The orb is destroyed when its health reaches 0.
    • [Short] Value: The amount of experience the orb gives when picked up.

Video

Experience/video

History

In an image of the new lighting system, a small yellow (the orb was yellow due to a warm light from a torch) spherical shape can be seen on the left side of the screen,[1] but a day after the photo was published Notch claimed it had an error and posted a new one, this time, without a yellow sphere.[2] In a later tweet, Notch showed a picture of a Beta 1.7 change-list (back then the adventure update was supposed to be in beta 1.7). Although it was completely blurred out and was, at first, thought of as a joke,[3] but then Notch stated that one of the pictures with the new lighting system and the change list had a secret in them,[4] and people all around the web started speculating.

One place that people discussed it was on the Minecraft forums, where it was discovered that the tabs at the top of the change list that were partly covered, could be decoded based on the 2 pixel tall pattern available in the image.[5]

After a user named "tmcaffeine" successfully decoded it, the tabs read: ExperienceOrb.java, changelist.txt, Level.java, Tile.java, HugeMushroomTile.java, HugeMushroomFeature.java, RandomLevelSource(cut)

[hide]classic
?A precursor to the experience system was the score in Classic Survival Test.
[hide]beta
1.8Experience was originally revealed by Jeb during an interview.[6] Jeb released a picture of the 1.8 GUI list, which shows the experience bar, among other things.
Experience was added, but there was no measurable benefit to gaining Experience Orbs and levels.
[hide]Java Edition
1.0.0For this version only, as a test, experience was gained when jumping. However, experience still did nothing.
Lua error in Module:Version_link at line 117: attempt to concatenate local 'text' (a nil value).Change mentioned in the previous version removed.
Lua error in Module:Version_link at line 117: attempt to concatenate local 'text' (a nil value).The ability to spend experience levels for Enchanting items was added.
The level number was shown, and each level was harder to get to than the previous one.
Lua error in Module:Version_link at line 117: attempt to concatenate local 'text' (a nil value).Orbs now make a twinkling sound when collected.
Lua error in Module:Version_link at line 117: attempt to concatenate local 'text' (a nil value).Amount of experience orbs dropped by a player on death now limited.
Score will now appear correctly on “Game over!” screen. Each experience orb is worth one Score Point.
1.2.1The Bottle o' Enchanting was added, but the next snapshot made it only useful for adventure maps.
Lua error in Module:Version_link at line 117: attempt to concatenate local 'text' (a nil value).Removed the need for experience when enchanting in creative mode. Experience requirements were also changed in this update.
1.3.1Players can get XP from mining, breaking mob spawners, and smelting in a furnace. A very large amount of experience can be collected while mining, sometimes into the hundreds of levels. Coal, lapis lazuli, redstone, diamond and emerald ore give you experience points. Iron and gold ore instead give experience when smelted.
The cost to gain each level was made constant, at 17 points per level.
Only level 30 is required to get the maximum level of enchanting.
Lua error in Module:Version_link at line 117: attempt to concatenate local 'text' (a nil value).XP levels now cost 17 XP Orbs each until level 16, after which the cost per level grows linearly, and the total XP grows quadratically (incorrectly stated "exponentially" by Mojang). However, it is easier to get to 30 levels than it was before 12w22a.
1.4.2Leveling up now makes a twinkly bell sound, similar to but longer than the XP orb sound.
Lua error in Module:Version_link at line 117: attempt to concatenate local 'text' (a nil value).Levels could be used in commands by typing, for example, @a[lm=4,l=7], choosing everyone between 4 and 7 levels inclusive. This is normally used in a command block.
Lua error in Module:Version_link at line 117: attempt to concatenate local 'text' (a nil value).Anvils were added, repairing and combining items at the cost of experience levels.
The level-up sound now only plays every 5 levels, and is shortened.
1.6.1Experience levels no longer appear in Creative mode. Previously, experience would be hidden but experience levels would show.
1.8Changes to the enchanting system mean that levelling up requires more experience.
1.9Experience is now collected at the feet, meaning that if a large amount of experience is collected, it no longer blocks the player's view.
1.11Changed entity ID from XPOrb to xp_orb
1.13Experience orbs will now float up in water.
1.13Experience orb id changed to experience_orb.
[hide]Pocket Edition Alpha
0.12.1Added experience.
AlphaExperience orbs will now burn in fire or lava.
[hide]Pocket Edition
1.1The entity ID is changed from xporb to xp_orb.
[hide]Legacy Console Edition
Xbox 360 Xbox One PS3 PS4 PS Vita Wii U Switch
TU7CU1Patch 1Added experience. Experience is collectable from smelting and/or mining ores, breeding and killing mobs.
[hide]New Nintendo 3DS Edition
0.1.0Added experience.
1.1.06Experience is now collectable from smelting and/or mining ores, as well as trading.
An example of the excessive amount of experience orbs dropped upon death in Beta 1.8, causing extreme performance drops.

The experience level costs were heavily revised in snapshot 12w22a and 12w23a. Before these, reaching level 50 (the maximum usable on a single enchantment) required 4625 experience, corresponding to defeating 925 hostile mobs (assuming the "common" ones.) Afterwards, considerably less experience is needed to get into higher levels (The amount which would formerly get the player to level 30 now gets them to level 39). Higher levels cost more experience than lower ones, but the levels are still easier to get than in 1.2.5. Now level 30 is the maximum for enchantments, and that cost is equivalent of 165 "common" mobs, less than 1/5 the old price.

Values from Beta 1.8 – 1.3.1 (12w23a)[show][edit]

Values from 1.3.1–1.8 (14w02a)[show][edit]

Issues

Issues relating to "Experience" or "Orb" are maintained on the bug tracker. Issues should be reported and viewed there.

Trivia

  • Using experience on enchanting or repairing does not decrease your score (which is shown on death).
  • If a player gain too many experience points (such as a trillion through commands), the experience bar will disappear altogether as well as your level on your HUD. This appears to occur around level 32,767 (which is equal to 215–1, the largest value representable as a 16-bit signed integer).
    • The maximum XP that you can earn from the /experience command is 2,147,483,647 levels (which is equal to 231–1, the largest value representable as a 32-bit signed integer).
    • The maximum experience level is 24791 (With just /experience).
    • The maximum glitchless experience level is 32767 (With just /experience # levels, where # is the level and levels increases the person's level by that many levels)
    • The highest level you can gain with /experience without overflowing is 1241258, which results in 2,147,483,647 experience, which is the maximum value for the int data type in Java, which is what is used to store the experience value.

Gallery

See also

References