跳到正文

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

作者:modgirluwu

Anvils no longer cap max XP cost at 40

收藏

截图

介绍

中文介绍正在准备中,下面暂时显示原文。

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

 

常见问题

Xp Is No Object [AKA: Anvil cost cap removed] [Forge] 支持哪些 Minecraft 版本?

Xp Is No Object [AKA: Anvil cost cap removed] [Forge] 支持 Minecraft Java 版 1.18–1.18.1,共 2 个版本,可用的加载器:Forge。下载时注意选择和你游戏版本一致的文件。

Xp Is No Object [AKA: Anvil cost cap removed] [Forge] 怎么安装?

先用 PCL2 或 HMCL 启动器安装对应版本的 Forge,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。

评论

登录后评论和评分