Experience

From Minecraft Wiki
Jump to: navigation, search
This article is about the experience system. For the command, see Commands/experience.
Split-arrows.svg
It has been suggested that this page be split into Experience and Experience Orb. Do not split pages until a consensus has been reached. [discuss]
Reason: This page seems pretty bulky, and compounds a bunch of otherwise unrelated information about experience and the experience orb entity.
Experience Orb
Experience Orb Value -32768-2.pngExperience Orb Value 3-6.pngExperience Orb Value 7-16.pngExperience Orb Value 17-36.pngExperience Orb Value 37-72.pngExperience Orb Value 73-148.pngExperience Orb Value 149-306.pngExperience Orb Value 307-616.pngExperience Orb Value 617-1236.pngExperience Orb Value 1237-2476.pngExperience Orb Value 2477-32767.png
Hitbox size

Height: 0.5 Blocks
Width: 0.5 Blocks

XP bar visible above hotbar.

Experience (EXP or XP for short) can be obtained by gathering experience orbs from mining, defeating mobs and players, breeding, trading, fishing, completing advancements, and using grindstones and furnaces. Experience gained during a player's life affects the player's score on the death screen. While having no direct effect on the player character, it can be used to enhance their equipment through enchanting, or by using an anvil to repair, rename, or combine enchantments on equipment.

Sources[edit]

Experience can be gained from several different sources:

  • From killing most mobs, which drop experience orbs along with any other items.
    • A mob does 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 etc. (fetching the orbs might be another question). The player 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 drops XP.
    • Deaths of hostile zombified piglins always register as kills by the player they are targeting, regardless of whether that player ever touched that zombified piglin.[1]
    • Mobs killed by TNT activated by a player using flint and steel 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 drop a random number of orbs, and the orbs can have different values. However, the total value always remains 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 totaling 12,000 XP the first time a player kills it – 12 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 pickaxe 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 still produces 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, gold, nether gold, and ancient debris 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, cactus giving the most.
    • The smelted material must be taken from the furnace through its GUI window. If the player uses 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 drops all stored experience as collectable experience orbs.
  • 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 /experience command.
  • From disenchanting items in a grindstone.
  • From completing a challenge advancement.‌[JE only]

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), and all of the other experience vanishes. If the gamerule keepInventory is set to true, the experience is kept even if the player dies.

Experience orbs[edit]

Experience orbs fade between green and yellow colors and float or glide toward the player up to a distance of 7.25 blocks (calculated from the center of player's feet and the center of the experience orb), speeding up as they get nearer to the player. Experience orbs pulled toward 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 the range of the player, they are 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 disappears.

Experience orbs vary in value. The general worth of an orb is reflected by its size, with eleven possible sizes corresponding to specific values. The three smallest sizes are the most commonly encountered, as the majority of experience dropped by mobs and blocks is less than ten. Dense experience orbs, from values 17 and up, have orange "eyes" or "cores", and are less frequently encountered, most commonly from defeating the ender dragon, wither and other players, disenchanting objects on a grindstone, breaking spawners, and collecting items from high- traffic furnaces (currently the only way to obtain size 11 orbs in Survival mode). Unlike with dropped items, experience orbs do not merge into larger higher-value experience orbs when close to each other.

Orb Minimum value Maximum value
-32768 2
3 6
7 16
17 36
37 72
73 148
149 306
307 616
617 1236
1237 2476
2477 32767

Naturally spawned orbs always have an integer value of 1–11, 17, 37, 73, 149, 307, 617, 1237, or 2477. 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. Such orbs can only exist in the world via furnaces which have had a lot of traffic.

Experience orbs with negative values can be created using the /summon command, either using values below 0 or above 32767 due to 16-bit integer overflow. They have the smallest texture of experience orb. While collecting them does not affect the player's experience bar in any way, they can deduct durability from a tool enchanted with Mending, provided the tool is already damaged prior to collection of the orbs.[2]

Like items, experience orbs float when on water.‌[Java Edition only] Experience orbs can be destroyed by fire, lava, explosions, and cacti, and can trigger pressure plates and tripwires. Experience orbs can also stop minecarts.

In Bedrock Edition, although mob drops spawn the instant the final blow is dealt to the mob, experience orbs do not appear until the mob entity disappears and the smoke appears.

In Java Edition, experience orbs appear in the same spatial and temporal location as loot when an entity is killed.

Experience amounts by source[edit]

Source Experience
Animals
Bee, Cat, Chicken, Fish (including Cod, Salmon, Pufferfish and all Tropical Fish),
Cow, Fox,
Horse (including Donkey, Mule, Skeleton Horse, and Zombie Horse),
Llama (including Trader Llama),
Mooshroom, Ocelot, Panda, Parrot, Pig, Polar Bear, Rabbit, Sheep, Squid, Dolphin, Turtle, Wolf, Strider[BE only][note 1]
1–3
Strider[JE only] 1–2
Bat, all baby animals except hoglins[JE only] 0
Golems
Iron Golem, Snow Golem 0
Monsters
Cave Spider, Creeper, Drowned, Enderman, Ghast, Hoglin, Husk, Illusioner, Phantom, Piglin, Pillager, Shulker, Silverfish, Skeleton, Spider, Stray, Vex, Vindicator, Witch, Wither Skeleton, Zombie, Zombie Villager, Zoglin, Zombified Piglin 5 + 1–3 (per equipment)
Endermite 3
Large Slime and Magma Cube[note 2] 4
Medium Slime and Magma Cube[note 2] 2
Small Slime and Magma Cube 1
Baby Husk, Baby Drowned, Baby Zombie, Baby Zombified Piglin, Baby Zombie Villager 12 + 1–3 (per equipment)
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, Evoker, Elder Guardian,[note 4] Guardian 10
Ravager, Piglin Brute 20
Players and NPCs
Player 7 per level, up to 100
Agent, NPC, Villager, Wandering trader 0
Bosses
Ender Dragon 12,000 (500 if respawned with end crystals)
Wither 50
Mining blocks
Coal Ore 0–2
Nether Gold Ore[verify] 0–1
Diamond Ore, Emerald Ore 3–7
Lapis Lazuli Ore, Nether Quartz Ore 2–5
Redstone Ore 1–5
Monster Spawner 15–43
Smelting/Cooking
Ancient Debris 2
Cactus[Java Edition only], Diamond Ore, Emerald Ore, Gold Ore, Nether Gold Ore 1
Iron Ore, Redstone Ore 0.7 [note 5]
Clay, Potato, Raw Beef, Raw Chicken, Raw Cod,
Raw Mutton, Raw Porkchop, Raw Rabbit, Raw Salmon
0.35 [note 5]
Clay 0.3 [note 5]
Lapis Lazuli Ore, Nether Quartz Ore, Cactus[Bedrock Edition only] 0.2 [note 5]
Wet Sponge, Wood 0.15 [note 5]
Chorus Fruit, Coal Ore, Cobblestone, Stone
Dyed Terracotta, Netherrack, Sand, Stone Bricks
Iron or Golden Sword, Iron Tools, Golden Tools,
Iron Armor, Golden Armor, Chain Armor
Iron or Golden Horse Armor, Kelp
0.1 [note 5]
Completing Challenge advancements[Java Edition only]
Return to Sender, Great View From Up Here, Sniper Duel, Bullseye, A Complete Catalogue 50
Two Birds, One Arrow 65
Arbalistic 85
Subspace Bubble, Uneasy Alliance, Cover Me in Debris, A Furious Cocktail, Hero of the Village, Monsters Hunted, Two by Two, A Balanced Diet, Serious Dedication 100
Hot Tourist Destinations, Adventuring Time 500
How Did We Get Here? 1,000
Other
Bottle o' Enchanting 3–11
Trading with villagers 3–6 (8–11 if the villagers
are willing to breed)
HeartParticle.png Breeding animals 1–7
Catching Fish 1–6
  1. Excludes baby animals and jockeys.
  2. 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. a b Jockeys consists of two mobs that move as one. Each part drops experience separately when it is defeated.
  4. Elder guardians are considered monsters In Java Edition, while they are considered bosses In Bedrock Edition.
  5. 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[edit]

Level Total XP Difference of XP between levels
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
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
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
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

XP Per Level 14w02a.svg

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

Experience required =
2 × current_level + 7 (for levels 0–15)
5 × current_level – 38 (for levels 16–30)
9 × current_level – 158 (for levels 31+)

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

Total experience =
level2 + 6 × level (at levels 0–16)
2.5 × level2 – 40.5 × level + 360 (at levels 17–31)
4.5 × level2 – 162.5 × level + 2220 (at levels 32+)
See here for a spreadsheet with Total experience and required experience up to level 10000

Useful numbers[edit]

  • To get from level 0 to level 30 requires 1395 experience.
  • To get from level 27 to level 30 requires 306 experience.
  • Killing one large slime and all the slimes that split from it yield from 12 to 28 experience, with an average of 20.
  • The maximum level required for enchanting is level 30, while the anvil accepts 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 gives 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 has a value of 1237 experience points, and can take a player from zero to level 28 all by itself.
  • The maximum experience value that can be gained by /experience command is 2147483647 which is (231 - 1). This is likely due to experience being stored as a signed Java-standard 32-bit integer.
  • The maximum level of XP that players can get legitimately is 21863,[more information needed] but they can get up to 2147483647 using commands, in this case, the experience bar may disappear and reappear.[3]

Score[edit]

Example of the score in Hardcore mode.

The 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.

Sounds[edit]

SoundSubtitleSourceDescriptionNamespaced IDTranslation keyVolumePitchAttenuation
distance
Experience gained??entity.experience_orb.pickupsubtitles.entity.experience_orb.pickup??16
Player dings??entity.player.levelupsubtitles.entity.player.levelup??16

Data values[edit]

ID[edit]

Java Edition:

NameNamespaced IDTranslation key
Experience Orbexperience_orb entity.minecraft.experience_orb

Bedrock Edition:

NameNamespaced IDNumeric ID Translation key
Experience Orbxp_orb 69entity.xp_orb.name

Entity data[edit]

See also: Chunk format

Experience orbs have entity data associated with them that contain various properties.

  • Entity data
    • Tags common to all entities see Template:Nbt inherit/entity/template
    •  Age: The number of ticks the XP orb has been "untouched". After 6000 ticks (5 minutes) the orb is destroyed.
    •  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. However, this value is stored as a byte in saved data, and read as a short but clipped to the range of a byte. As a result, its range is 0-255, always positive, and values exceeding 255 overflow.
    •  Value: The amount of experience the orb gives when picked up.
    •  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.

Video[edit]

History[edit]

Cleanup.svg
This section may need cleanup to comply with the style guide. [discuss]
Please help the Minecraft Wiki clean up this page if you can.
The specific problem is: Put the paragraphs below into the history table

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,[4] 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.[5] 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,[6] but then Notch stated that one of the pictures with the new lighting system and the change list had a secret in them,[7] 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.[8]

After a user named "tmcaffeine" successfully decoded it, the tabs read: ExperienceOrb.javachangelist.txtLevel.javaTile.javaHugeMushroomTile.javaHugeMushroomFeature.java, and RandomLevelSource(cut).

Java Edition Classic
?A precursor to the experience system was the score in Classic Survival Test.
Java Edition Indev
February 17, 2010XP levels are mentioned by Notch.
Java Edition Beta
1.8Pre-releaseExperience was originally revealed by Jeb during an interview with Minecraft Forum.[9] Jeb released a picture of the 1.8 GUI list, which shows the experience bar, among other things.
[verify] Added experience.
There is currently no measurable benefit for gaining experience orbs and levels.
Pre-release 2Experience Orb (sprite) Revision 1.gif Experience orbs no longer render as translucent.[10]
Java Edition
1.0.0Beta 1.9 PrereleaseFor this version only, as a test, experience is gained when the player is jumping. However, experience still does not do anything.
Beta 1.9 Prerelease 2The experience change that was mentioned in the previous version has now been removed. Experience is no longer gained when the player jumps.
Beta 1.9 Prerelease 4The ability to spend experience levels for enchanting items has now been added.
The experience level number is now shown, and each level is harder to get to than the previous one.
Beta Sound UpdateExperience orbs use to make a lower pitch of the collecting items sound, but now Experience orbs make a twinkling sound when collected.
?The amount of experience orbs dropped by a player on death is now limited.
The score the player gains now appears correctly on "Game over!" screen. Each experience orb is worth one Score Point.
1.2.112w04aAdded bottles o' enchanting, an item that the player can gain experience from.
12w05aThe need for experience when enchanting in creative mode has now been removed. Due to this, bottles o' enchanting are now only useful in adventure maps.
Experience requirements have now been changed, in this update.
1.3.112w22aPlayers can now get experience 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 now give players experience points.
Iron and gold ore now instead give experience when they are smelted.
The cost to gain each level has now been made constant, at 17 experience points per level.
Only level 30 is required to get the maximum level of enchanting.
12w23aXP levels now cost 17 experience 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.212w38aLeveling up now makes a twinkly bell sound, similar to, but longer than the experience orb sound.
12w39aExperience levels can now 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.
12w41aAdded anvils, which allows for the repairing and combining of items, at the cost of experience levels.
The level-up sound from collecting experience now plays every 5 levels, and is shortened.
1.6.113w21aExperience levels no longer appear in creative mode. Previously, experience would be hidden, but experience levels would show.
1.814w02aThe changes to the enchanting system mean that leveling up now requires more experience.
Experience Orb (sprite) Revision 2.gif The texture of experience orbs has now been changed.
1.915w46aExperience is now collected at the feet, meaning that if a large amount of experience is collected, it no longer blocks the player's view.[11]
1.1116w32aThe entity ID of experience orbs has now been changed from XPOrb to xp_orb
1.1318w19aExperience orbs now float up in water.
pre5The experience orb ID has now been changed to experience_orb.
1.15?Experience orbs now appear translucent again.
?Experience orbs no longer appear translucent.
19w46aExperience orbs now appear immediately when a mob is killed (similar to loot), instead of when its corpse disappears.
The rendering of experience orbs has now been changed. They have become translucent again.
Upcoming Java Edition
1.1720w45aExperience Orbs now sometimes merge when in large quantities.
Experience Orbs no longer follow dead players.
Pocket Edition Alpha
0.12.1build 1Experience Orb (sprite) Revision 2.gif Added experience.
build 8Experience orbs now burn in fire or lava.
Pocket Edition
1.1.0alpha 1.1.0.0The entity ID of experience orbs has now been changed from xporb to xp_orb.
Bedrock Edition
1.14.0beta 1.14.0.1The amount of experience dropped by animals to match Java Edition.
1.16.100beta 1.16.100.51Experience orbs now float up in water.
Legacy Console Edition
TU7CU1 1.0 Patch 11.0.1Experience Orb (sprite) Revision 1.gif Added experience.
Experience is collectable from smelting and/or mining ores, breeding and killing mobs.
New Nintendo 3DS Edition
0.1.0Experience Orb (sprite) Revision 2.gif Added 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.) Afterward, 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 Java Edition Beta 1.8 to 1.3.1 (12w23a)

Values from Java Edition 1.3.1 to 1.8 (14w02a)

Issues[edit]

Issues relating to "Experience" or "Orb" are maintained on the bug tracker. Report issues there.

Trivia[edit]

  • 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.[12]
  • 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.
  • Every 5 levels, a special XP sound plays. The sound plays each time the player reaches a multiple of 5 levels.
  • Before Beta 1.9 Prerelease 2, the score read &e0.
    • This was caused by an 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).
  • 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 textures which are all identical and their purpose is unknown.
  • The experience sound is similar to the PlayStation startup sound.

Gallery[edit]

See also[edit]

References[edit]