promotional bannermobile promotional banner
premium banner

Description

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