Mineuniverse
Log in Register
Mods

Xp Is No Object [AKA: Anvil cost cap removed] [Forge]

Anvils no longer cap max XP cost at 40
by modgirluwu
Claim this project
5,139 downloads
0 likes
Updated Jun 30, 2026
0 hypes

'too expensive'? PAH! Ridiculous. Nothing is too expensive for my anvils. And now yours, too. For Forge.

 

---

 

Okay, so I've been told that was a lil vague. Sorry. Ahem.

For those who aren't in the know, Minecraft, the popular voxel sandbox game, has an enchanting system that uses levels. These XP levels can be spent to upgrade tools by right clicking on various 'tool blocks'. One such block is the anvil. Oddly enough, you are only allowed to upgrade things if it costs less than 40 levels of your XP, in the base game.

 

This modification, or, 'mod' (the kids use this term for a modification of a game) uses the Sponge mixin system, which has been included in Forge since 1.16.5 or so, to replace the hardcoded values for `40` with `MAXINT` (the maximum value a conventional integer is allowed to be, due to memory constraints). In some places in the code, this value is set to 39, so I set it to `MAXINT - 1`. This only affects the anvil code in a few select functions, and does not touch any of the other code or values.

 

This mod is like 10 lines of trivial code, and the rest is boilerplate. It is licensed GNU GPLv3. That means you are free to distribute it and modify it as long as you do so under the same license, so feel free to include it in your modpack, if you want. This is optional. You can choose not to include it in your modpack. In fact, you can choose not to even download it. I won't mind.

There were, in fact, already mods (modifications) for Minecraft that did very similar things, but they all were built for older versions of Minecraft, or use Fabric (a competing, and frankly superior mod toolchain) instead. Since it's so easy to make, I decided to make and release it with open source so that the community has an option for this use case.

If you want to see the code, suggest changes, or report issues, you can click the 'Issues' or 'Source' tabs at the top to find my Github repository & issue tracker.


Thank you for coming to my ted talk.

 

No files available for download.

More from modgirluwu

Vanilla Scented Additions [Fabric] (AKA Grated Magma Blocks)
365

You Might Also Like

Falling Meteors Mod
Meteors naturally fall upon your world, holding incredibly useful ores
997,797
Cloro's Gravity Gun
Bring the Half-Life 2 gravity gun to minecraft!
99,152
Cosmaztic's Swords : Reworked [Create]
My Cosmaztic's Sword Mod : Reworked, with some swords using create items.
9,985
Sculk Dagger
Sculk Dagger
9,969
Minewatch Session 2
A new Hero Mod from a Big Game
9,958
Expanded Bow Enchantings
This Datapack and Mod allow to use Looting on a Bow and allows Mending and Infinity to be on the same bow on the same Bow!
9,947