Is it possible to disable the level cap for enchantment? [duplicate]

I'd like to have higher levels of enchantment. Is it possible to turn of the level cap?

For example, if I put two Sharpness 5 books in an anvil, and get a Sharpness 6 book out.


Solution 1:

I don't think you can completely disable the level cap, however I know you can exceed it.

If you don't want to go the whole “enchanted book” route you can use /give to get an item with almost any level of enchantment. The top limit is 32,767 before it has an overflow into negative numbers.

So if you are looking for a "command way" that can give you an enchanted item with a level you can do it like this:

In order to have a single enchantment on an item:

give yourname diamond_sword{Enchantments:[{id:fortune,lvl:10}]} 1

In order to have more than one enchantment on an item:

give yourname diamond_sword{Enchantments:[{id:knockback,lvl:10},{id:looting,lvl:10}]} 1

You can also find an expansive list of IDs on the Minecraft gamepedia.

Here’s a reference I used.

Solution 2:

No, you cannot. The level cap is a set number in the code, so you would have to edit the code directly to take it out.

The best thing you could do would be to go into Creative mode, in which this limit does not exist, combine the items, remember the level cost, remove that amount of levels from yourself with a command like /xp add @s -100 levels and then go back into Survival mode. But this would also not prevent you from combining items if your XP level is too low, so you would need to be careful about that as well.
You could also completely re-implement the entire mechanic of combining items with commands, but that is a major project.