VOOZH about

URL: https://minecraft.wiki/w/Talk:Enchanting_table_mechanics

⇱ Talk:Enchanting table mechanics – Minecraft Wiki


Talk:Enchanting table mechanics

From Minecraft Wiki
Latest comment: 13 May by Rampage455 in topic Feedback (Tue, 12 May 2026 16:22:27 UTC)
Jump to navigation Jump to search

Min/Max Levels

[edit source]
Latest comment: 19 September 20128 comments4 people in discussion

According to the page, the min and max range for bookshelves, b, seems a bit weird to me when b = 30. Even if that table is designed using the third slot, the formula itself gives me a minimum level of 16 to 50. If it was designed for the first slot, which sets s to 0.5, i get a range of 8 to 25 not the min of 9 shown there. On the off-hand chance of it being designed for the second slot, it gets a range for 11 to 33. Where is it that it's getting a minimum level of 9? Kalbintion 22:06, 7 June 2012 (UTC)

The maximum assumes the bottom slot is used, and the minimum uses the top slot. The problem is that the formula is not quite accurately described. Starting with
Base enchantment level available = (1..5 + (b/2) + 0..b)
where b is the number of bookshelves (as on the page currently), the top slot has
Actual level = (base / 2) + 1
and the middle slot has
Actual level = ((base * 2) / 3) + 1
All calculations are performed in integer arithmetic (all fractions round down). That '+ 1' is why the minimum level with 30 bookshelves is 9, rather than 8. Of course, all this may have changed in the latest snapshot releases. -- Orthotope 01:36, 8 June 2012 (UTC)
The base formula still seems wrong. With 15 bookshelves, you get a base of 1..5 + (15/2) + 0..15, thus the max level available would be 5 + 7 + 15 = 27 (and 5 with no bookshelves at all). Ord did I get something wrong ? --78.210.48.117 08:32, 2 September 2012 (UTC)
I got exactly the same answer in as the previous post using the formula as it is on the page. I also used the formula to calculate the minimum for b = 15. That gives me exactly 4.25, while this page says it should be 2 (rounded down). I also got the same answer for b = 0, so I think somethings wrong with this formula. --Creator13 18:40, 17 September 2012 (UTC)
This was changed in 1.3. New formulas:
Base level = (1..8 + (b/2) + 0..b)
Top slot level = max(base / 3, 1)
Middle slot level = ((base * 2) / 3) + 1 (same as before)
Bottom slot level = max(base, b * 2)
-- Orthotope 02:18, 18 September 2012 (UTC)
Sorry for complaining more, but I don't understand some parts of the formula, like the "max" before the top and bottom slot formula; and in the top slot, I don't understand the comma between the 3 and the 1. Does this mean 3.1, or anything else of a higher mathematical level than I have :/ ? Please forgive me about asking this, but I'm writing a program where I need these formulas. By the way, may we ask things like this on the discussion page, if not, please tell me so I know it for the next time... --Creator13 19:48, 18 September 2012 (UTC)
max(a, b) picks the greater of the two numbers a and b. In the top slot, this ensures the level is at least 1 (with no bookshelves, base can be as low as 1, and in integer arithmetic 1/3 = 0). In the bottom slot, the level will always be at least twice the number of bookshelves. This is why it always gives a level 30 enchantment when you have 15 bookshelves nearby. -- Orthotope 03:02, 19 September 2012 (UTC)
Thanks, really, this helped me alot. Except that I now have to rewrite the code... Creator13 19:00, 19 September 2012 (UTC)

probability after 1.3.1

[edit source]
Latest comment: 19 August 20121 comment1 person in discussion

Can anyone confirm these probability charts? According to the charts it is no longer possible to get efficiency 5 on a diamond pick.

- Also not possible to get Sharpness V on diamond sword and it's only 0.2% chance on a golden sword with level 30. 94.237.64.32 23:58, 19 August 2012 (UTC)

Move page

[edit source]
Latest comment: 22 February 20153 comments3 people in discussion

I think this page should be merged with enchanting since it involves enchantments. 64.56.253.180 20:19, 6 December 2012 (UTC)

They originally were on the same page. This information was split off as it's rather technical, and players don't need to understand it in order to make use of enchantments. -- Orthotope 08:52, 7 December 2012 (UTC)
Actually it isn't technical, but not everyone can figure out the ideal enchantment level using math.71.35.109.25 21:16, 22 February 2015 (UTC)

How about books?

[edit source]
Latest comment: 8 January 20134 comments3 people in discussion

Enchantability is clearly not an issue, but contra some rumors, I did see enchantments up to level 30 when I tried it (only once so far). Can anyone figure out how enchanted books pick their results? --Mental Mouse 21:32, 21 December 2012 (UTC)

I only did some experimenting in creative, but I noticed that books will only pick one enchantment. You can use up to 30 levels to enchant them, and the higher the level, the more likely for a higher level/better enchantment. I would assume that the algorithm is very much the same, only it picks 1 enchantment rather than allowing for multiples. I'd be interested to see what other people find as well. --Kahless61 21:37, 21 December 2012 (UTC)
Using [[Minecraft Coder Pack]] I've found out that enchantability value of the book item is 1, the same as for bow. --skupr [this was posted at 09:51, December 25, 2012]
Thanks! --Mental Mouse 12:17, 25 December 2012 (UTC)
I added a spreadsheet to the Enchant Probabilities Chart section at the bottom of the article. It includes the probabilities for enchantments on books. It's in an old Excel format, which I hope is acceptable. Teh chad 18:41, 8 January 2013 (UTC)
Perhapse you could decrypt the excel format with reguard to Silk Touch on a book. Being that the only legitimate method of obtaining webs is to aquire a silk touch book to enchant shears, discovering the most effective number of levels to apply has become a noteworthy challenge. [[Pestilencemage]] 1 Febuary 2013

Slot

[edit source]
Latest comment: 8 January 20132 comments2 people in discussion

Please, explain what is meaning of word "slot" in this text. In the text of Enchantment_Table is used word "slot" for square to place an item. On the right side of slot there are 3 buttons for displaying cryptic runes. Is the "slot" meaning the "button" in the text of Enchantment_mechanics? Thanks. –Preceding unsigned comment was added by Bj9 (Talk|Contribs) 17:48, 4 January 2013 (UTC). Please sign your posts with ~~~~

Yes, they are using the word "slot" to mean the three buttons on the right side of the enchant display. They probably could have chosen a more specific word. Teh chad 18:38, 8 January 2013 (UTC)

Enchant Probability Update

[edit source]
Latest comment: 8 January 20131 comment1 person in discussion

I created a test harness to test enchantment probabilities. It takes a list of all enchantable items and loops through all 30 possible levels spent on each enchantment. It does one million enchantments per item per experience level. This means that there are 30 million tests done per item type. I added a link to the spreadsheet at the bottom of the main article in the Enchantment Probability Chart section. The spreadsheet is in an older Excel format, so it should be able to be opened by open source spreadsheet programs. I included the aggregated raw data in the spreadsheet as well. It should provide a pretty interesting read. --Teh chad 17:47, 8 January 2013 (UTC)

Step 3 explanation

[edit source]
Latest comment: 21 April 20246 comments5 people in discussion

I think there is too little information in step 3. It's about selecting the enchantments which will be applied to the item, but I don't actually see anything on how that actually happens. Also, I don't get the formula: what is "P(enchantment)"? Could anyone please help me with this? I need it for for a program I'm making, so... --Creator13 19:15, 21 March 2013 (UTC)

In plain english, that formula says the probability of any given enchantment being chosen is the weight of that enchantment divided by the sum of the weights of all possible enchantments for the item being enchanted. In code, this is usually done by generating a random integer less than that sum, and figuring out which weighted enchantment it corresponds to. For example, the tool enchantments have weights of 10, 1, 5, and 2, so you'd generate a random number in the range 0-17 inclusive: 0-9 would be Efficiency, 10 is Silk Touch, 11-15 for Unbreaking, and 16-17 is Fortune. Make sense? -- Orthotope 04:26, 22 March 2013 (UTC)
Wouldn't it be an idea to post this on the main page? 83.163.218.191 17:25, 22 March 2013 (UTC)


Minecraft uses the following weighted random selection algorithm:

1.Calculate the total weight of all enchantments in the list (T). The total of every enchantment is 136.

2.Pick a random integer in the half range [0; T) as a number w.

3.Iterate through each enchantment in the list, subtracting its weight from w. If w is now negative, select the current enchantment.

I understand everything else, but I don't understand number two. Please give me an example of this

2.Pick a random integer in the half range [0; T) as a number w. what is mean "half range [0; T)" ? If T is 136 range is [0:68]?

what is half..? Nada1212 (talk) 18:48, 19 April 2023 (UTC)

In mathematics notation, a half range [a; b) means a range starting with a, with a included and ending with b - 1 -- that is, with b excluded. This description is needlessly confusing in this case, IMHO, but it makes sense in computer code where counting often starts from zero and if you want to count N things you wind up with a counter value of N - 1. Weirdnoise (talk) 01:14, 21 April 2024 (UTC)
(Note: defining a half-range in this way applies specifically to integers -- for real numbers it means the latter half of the range has a limit of b but does not include it.) Weirdnoise (talk) 01:18, 21 April 2024 (UTC)

Step 1: Code or Text?

[edit source]
Latest comment: 5 July 20132 comments2 people in discussion

It seems to be some inconsistency between the textual description and some of the formulas / pseudocode:

"Minecraft picks a number between 0 and half the enchantability, (actually 1/4 rounded down and multiplied by 2)"

vs

"This random value follows a triangular distribution (like rolling a pair of dice and adding) so results close to half the enchantability are much more likely than results at the extremes"


If the random number is between 0 and half enchantability, then results of a triangular distribution should be close to a quarter of enchantability, not half.

But then, pseudocode presents this:

int rand_enchantability = 1 + randomInt(enchantability_2 / 2 + 1) + randomInt(enchantability_2 / 2 + 1);

Which seems to be a triangular distribution between 0 and full enchantability (not half), which does make half enchantability results more likely.

So, what is the correct behavior? MestreLion 05:06, 5 July 2013 (UTC)

Note the previous line in the pseudocode: enchantability_2 = enchantability / 2. I changed the text to be a bit less confusing. -- Orthotope talk 06:37, 5 July 2013 (UTC)

Possible Mistake for 14 bookselves

[edit source]
Latest comment: 27 May 20244 comments4 people in discussion

Given the formula

(base) = (1..8 + floor(b/2) + 0..b)

and

Bottom slot enchantment level = max (base, b × 2)

When b = 14 (14 bookcases), and assuming highest random number you get:

(base) = 8 + floor(14/7) + 14 = 29
b × 2 = 28

Thus

max (29, 28) = 29

However, it is recorded that the highest level for 14 bookshelves is 28.

0pteron 17:43, 15 August 2013 (UTC)

After testing, I have discovered that it is possible to get a level 29 enchantment in the bottom slot for 14 bookshelves, it is just very rare. I estimate a level 29 enchantment was offered once for every 2 stacks of books I tried enchanting. This tracks with the pseudocode in the basic mechanics section. You can only get a level 29 enchantment if you get the maximum of both randomly generated numbers. For randomInt(1,8), there is a 1 in 8 chance of getting 8, for randomInt(0,14) there is a 1 in 15 chance of getting 14, so (1/8) x (1/15) = (1/120), which is almost the (1/128) estimate I got from enchanting stacks of books. Rampage455 (talk) 18:29, 27 May 2024 (UTC)

Update desperately needed!

[edit source]

This page desperately needs to be updated to include the new enchants added in 1.6. (Fishing.) We now have 1.7 and they still haven't been added! 79.77.42.218 14:44, 21 February 2014 (UTC)

There should be information for the enchantability of a fishing rod.

75.165.49.48 04:34, 29 January 2015 (UTC)

Clarification for modified enchantment leve

[edit source]
Latest comment: 28 January 20152 comments2 people in discussion

The article says that the level is multiplied by a random value from 0.85 to 1.15. How is this rounded?75.165.49.48 03:32, 28 January 2015 (UTC)

Quote from the article: "The modified enchantment level is multiplied by this value (so it could increase or decrease by up to 15%) and then rounded to the nearest integer." KnightMiner (t·c) 03:53, 28 January 2015 (UTC)

Fishing rod

[edit source]
Latest comment: 2 December 20152 comments2 people in discussion

This page does not have the enchantability of a fishing rod. What is the enchantability of a fishing rod?71.35.109.25 21:13, 22 February 2015 (UTC)


It's 1. Source: https://web.archive.org/web/20190710111240/http://i.imgur.com/vn4HV3r.png check near the bottom. --207.62.170.220 03:55, 2 December 2015 (UTC)

Enchantment probabilities w/preview

[edit source]
Latest comment: 31 March 20161 comment1 person in discussion

I don't see it anywhere, but it would certainly be nice to have a chart for the probabilities of getting an enchantment level with the a priori knowledge of getting the enchantment class. For instance, at level 30, you have an 8.6% chance of getting Fortune III, and a 5.3% chance of getting Fortune II. But, from the preview I already know I'm getting Fortune X so in reality my chance of getting Fortune III is: 8.6 / (8.6 + 5.3) = 62% chance. At least on the console version, it only seems to show the enchantment from base level (30 < 33, so Fortune II) in the preview and the actual enchantment uses the full formula. 205.208.103.113 17:01, 31 March 2016 (UTC)

Cursed Enchantments

[edit source]
Latest comment: 10 October 20162 comments2 people in discussion

I was hoping to update the table under the "Step Three" section with the new cursed enchantments, but am unaware of their weights. Does anyone know what they are, or how to find out? Thanks. DelboyDylan (talk) 18:07, 10 October 2016 (UTC)

They're both weight 1. If you can see into a decompiled 16w40a jar, in the aie.class, you can see at the bottom where it's registering all the enchantments, where the parameter is new aia( aia.a.d, ..., that it's using the same value for the curses as it does for Thorns, Silk Touch and Infinity. – Sealbudsman talk/contr 20:30, 10 October 2016 (UTC)

Sweeping Edge

[edit source]
Latest comment: 10 January 20175 comments3 people in discussion

Anyone know if this is considered a treasure enchantment or not? –Preceding unsigned comment was added by 65.94.228.190 (talk) at 12:54, 10 January 2017 (UTC). Please sign your posts with ~~~~

Someone would need to check the code to find out. Orthotope? Anomie x? The Blobs👁 Image
16:07, 10 January 2017 (UTC)
It's not a treasure enchantment.
In the decompiled 1.11.2.jar, aiv.class corresponds to the Sweeping enchantment, and it does not override the default behavior of the Enchantment abstract class aii.class, which is that c() (a.k.a. in MCP 9.31 isTreasureEnchantment()) returns false. This is the method that returns true in the case of Frost Walker, Mending and both Curses.
Also for future reference, you can sort of tell that it's not a treasure enchantment: a treasure enchantment is one that "can never be created by an enchantment table," (see the paragraph at treasure enchantment) whereas Sweeping can be applied to swords on an enchantment table (see the entry at Sweeping Edge). But on the other hand, it never hurts to check! – Sealbudsman talk/contr 17:17, 10 January 2017 (UTC)
Before adding it, though, we need to know its weight. Then, it should be added to the table. The Blobs👁 Image
17:22, 10 January 2017 (UTC)
👁 Image
 Done. It has the same weight as Fire Aspect and Looting. – Sealbudsman talk/contr 17:24, 10 January 2017 (UTC)

Latest update using 32767 in place of 1 and 2

[edit source]
Latest comment: 7 February 20194 comments3 people in discussion

the anon user that last updated the page changed the algorithm section to use 32757 to N-32767 in place of 0 to 1, but in the second paragraph seems to make a mistake by saying the range is from "32767 to 32767" .. so a range of 1 integer value, which cannot be correct. --Giftig (talk) 20:54, 6 February 2019 (UTC)

and again here --- // A random bonus, between .85 and 1.15 float rand_bonus_percent = 32767 + (randomFloat() + randomFloat() - 32767) * 0.15; --- do you mean to use two different random values, because that is what you get calling randomFloat twice.

The usual fix is to use a temp value float randFloat = randomFloat(); float rand_bonus_percent = 32767 + ( randFloat + randFloat - 32767) * 0.15;

and it should be noted that this is doing arithmetic on mixed number formats, integer and float, that is usually not good --Giftig (talk) 21:01, 6 February 2019 (UTC)

Feel free to correct anything you find that's incorrect, or to revert it if you don't know how to correct it. You'll find that editors who've been here a long time don't watch tutorials very closely (if at all) because we don't think they even belong on the wiki (they're mostly opinions and suggestions, not factual documentation). Most tutorials are only here because some people put up a big fuss when we tried to delete them. But the creators usually don't keep them up to date, so factual errors are common in them. Caveat lector.Auldrick (talk · contribs) 21:23, 6 February 2019 (UTC)
The 32767s are definitely not right and honestly look to me like recent vandalism. I undid those changes.
By the way, calling Random.nextFloat twice is correct; source diving reveals that the game does exactly that. This is how it gets a triangular distribution; it's the same as rolling two dice and adding the results. There is also often reason to convert floating-point numbers to integers as is done here, but it's true that it gets messed up sometimes. For instance, in C#, naively doing (int) (10 * 0.7f) may give 6, which (among other reasons) means the mining outfit in Terraria can boost mining speed by significantly more than it's supposed to.
The source code in fact uses Math.Round, instead of the cast used in the pseudocode... I feel it would be clearer and more correct to use Math.Round in the pseudocode as well. - Andrio Celos (talk) 04:15, 7 February 2019 (UTC)

Soul Speed

[edit source]

The wiki states that Soul Speed cannot be obtained via fishing, however, I have definitely received it via fishing in Bedrock Edition in 1.16.1. Does this statement need to be revised?

Should we use math?

[edit source]
Latest comment: 6 February 20241 comment1 person in discussion

I noticed that all of math formulas on this page are in pain text. I was wondering: should we use the mediawiki math element instead?

  • Example in view:
  • Example in source: <math>\operatorname{floor}\left(\max\left( {\frac{base}{3}, 1}\right)\right)</math>

--Simanelix (talk) 12:55, 6 February 2024 (UTC)

multiple enchantments—what does step one mean?

[edit source]
Latest comment: 25 March 20241 comment1 person in discussion

For choosing additional enchantments, the page states that

> 1. With probability (modified level + 1) / 50, keep going. Otherwise, stop picking bonus enchantments.

What does "With probability" mean?  👁 Image
Nayfaan
talk
contributions
  09:32, 25 March 2024 (UTC)

Calculator

[edit source]
Latest comment: 22 November 20254 comments4 people in discussion

Can a smart person add a calculator that can find your enchantment id that can make a sequence of actions to get the best enchantments? Teamdevosjes (talk) 09:59, 30 May 2024 (UTC)

There are some calculators in the external links section of the main article that can give you the odds of getting a particular enchantment for an item and enchantment level, but you cannot know for sure which enchantments will be offered in the future. There is a randomly generated number that determines what enchantments the enchantment table offers, and it gets updated to a new random number after you enchant something. See the Enchantment seed section of the article. Rampage455 (talk) 18:00, 11 June 2024 (UTC)
one of them is specifically for 1.8, and the other one has been broken for more than a year now OmegaSomeone (talk) 15:58, 27 May 2025 (UTC)
It's definitely not done, but It works to generate enchantments. You can host a server where you have a website to simulate or you could simulate directly in the console. https://github.com/SeeYou-Man/Minecraft-Enchantment-Probabilities This one Is at least farther along than my old project, called mce. I've tried to copy the structure found at http://pernsteiner.org/minecraft/ SeeYouMan (talk) 21:45, 22 November 2025 (UTC)

Spelling Error

[edit source]
Latest comment: 13 August 20242 comments2 people in discussion

Hey lovely and hardworking wiki editors, in the enchantability mechanics section, "pseudocode" is misspelled as "peudocode" the second time it appears. Just wanted to let you guys know! Love, Anonymous Minecraft Lover 50.35.37.169 02:28, 13 August 2024 (UTC)

You could have simply corrected the mistake yourself since this wiki is open to everyone to edit but thanks for notifying us anyways COS wikiuser (talk) 02:29, 13 August 2024 (UTC)

Merge

[edit source]
Latest comment: 30 July 202513 comments5 people in discussion

Responding to the proposed merge with Enchanting by SeaOfPixels, I am starting the discussion. I personally 👁 Image
 Oppose because I think this page is too long to merge, and is very technical, and therefore serves different purposes. --MinecraftExp123(talk|contribs) 01:36, 18 July 2025 (UTC)

This page contains important information that is not overly technical, such as Enchantability, that should absolutely be on the main Enchanting page. The only reason both pages are too long are because they contain unnecessary gigantic tables that should either be removed or made collapsed by default. The pages are actually very short outside of the gigantic tables. SeaOfPixels (talk) 00:45, 29 July 2025 (UTC)
Yeah, but the tables contain most of the information, since a lot of the mechanics is the data values. --MinecraftExp123(talk|contribs) 02:36, 29 July 2025 (UTC)
I disagree with the assessment that these tables are unnecessary and should be removed or be made collapsed by default. Can they be improved? Sure. But they contain lots of information that readers are likely looking for. I'd imagine way fewer people are interested in the exact intrinsics of enchanting mechanics. | violine1101 (talk) 20:01, 29 July 2025 (UTC)
Even though the page has already been merged, I'd like to throw in 👁 Image
 Oppose as well. In fact, some tables in Enchanting were collapsed because of this change because the page became too long.
I think it'd probably be a good idea to summarize the main takeaways from this article on Enchanting but still have a separate article with all the details. | violine1101 (talk) 19:59, 29 July 2025 (UTC)
👁 Image
 Oppose - The merge caused problems and made Enchanting overly long. Mudscape 👁 Image
talk
20:03, 29 July 2025 (UTC)
👁 Image
 Oppose - Enchanting was already quite long and the merge made the issue even more evident. Sightnado ( talk | contribs ) 20:08, 29 July 2025 (UTC)
Transcribed from discord: Information on enchanting being split into two pages arbitarily makes no sense. For context, the information for Enchanting is separate from the page for the Enchanting Table because one is a mechanic and one is a block. Similarly, the information for using Anvils is split between Anvil Mechanics and Anvil because one is a mechanic and one is a block. It makes no sense for Enchanting to have two separate pages for the same topic when both cover Enchanting. The initial argument was that Enchanting Mechanics is more technical, but this argument falls flat because that page contains key not technical information such as bookshelf placement and enchantability. The page being argued to be "too long" does not justify a split on its own when the split segregates important information arbitrarily. Mudscape's point that collapsing tables "kills ctrl+f" makes even less sense when the context is information being split across two pages arbitrarily. Please actually discuss ways of rewriting both pages to be reader friendly rather than motioning for the split simply by virtue of both being bloated SeaOfPixels (talk) 21:07, 29 July 2025 (UTC)
The splitting isn't arbitrary, as in Enchanting, the page has relevant info on stuff that you'd actually care about in-game, whereas in this page the details are quite technical, like how the pseudorandomness actually works. --MinecraftExp123(talk|contribs) 01:31, 30 July 2025 (UTC)
Like I said this isn't true at all. The enchanting mechnic page details mechanics in a step-by-step fashion, which by nature includes more technical AND less technical information. SeaOfPixels (talk) 03:04, 30 July 2025 (UTC)
In that case the non-technical information should be added to the main article without delving into the details, and this article can stay as-is. | violine1101 (talk) 18:44, 30 July 2025 (UTC)
That would create duplicate information as the information cannot be moved from the mechanics page while still keeping its step-by-step writing. SeaOfPixels (talk) 20:11, 30 July 2025 (UTC)
So what? | violine1101 (talk) 20:50, 30 July 2025 (UTC)

Feedback (Mon, 16 Mar 2026 22:27:49 UTC)

[edit source]
Latest comment: 13 May2 comments2 people in discussion
Resolved

2.2 (Bookshelf Placement, Java Edition)
I think that the color of blue and red wool are inverted on the table.

--FeedbackBot 22:27, 16 March 2026 (UTC)
The table is correct. Torches on the blue wool reduce the number of active bookshelves by 1, and torches on the red wool decrease the number of active bookshelves by 3. Rampage455 (talk) 01:42, 13 May 2026 (UTC)

Feedback (Tue, 12 May 2026 16:22:27 UTC)

[edit source]
Latest comment: 13 May2 comments2 people in discussion
Resolved

Density is not compatible with breach

--FeedbackBot 16:22, 12 May 2026 (UTC)
That is already stated in the article. In the table, that's what "with each other" refers to, and it is also stated in the Conflicting enchantments section under the table. Rampage455 (talk) 01:44, 13 May 2026 (UTC)
Retrieved from "https://minecraft.wiki/w/Talk:Enchanting_table_mechanics?oldid=3572854"

Navigation menu