跳到正文

Xi’s Multiversion UI Lib

作者:Xichil

Add a UI to you mod for every version and loader

收藏

介绍

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

Xi’s Multiversion UI Lib

A library mod that lets other mods build their settings menus once and run them on every Minecraft version from 1.7.10 to 26.x.

It does nothing by itself. If a mod you installed requires it, add the jar for your loader and you’re set.

For players

Which file do I need?

File Loader and versions
xis_mvui-<version>-fabric.jar Fabric and Quilt, 1.14 – 26.x
xis_mvui-<version>-legacyfabric.jar Legacy Fabric, 1.7.10 – 1.13.2
xis_mvui-<version>-forge-1.7.10.jar Forge 1.7.10
xis_mvui-<version>-forge-1.8-1.12.2.jar Forge 1.8 – 1.12.2
xis_mvui-<version>-modlauncher.jar Forge 1.13.2 – 26.x and NeoForge 1.20.1 – 26.x

It needs no other dependencies (no Fabric API).

Where do I find the menus?

  • Options screen: a button that opens the menu of the one mod that uses this library, or a "Mod menus" list when several do.
  • Mod list "Config" button: works on Forge and NeoForge 1.13+, and on Fabric with Mod Menu installed.

When something breaks

  • If one mod’s menu has a bug, only that menu turns off. The error is logged with the mod’s name, and every other mod’s menu keeps working.
  • If a Minecraft update breaks the library itself, the menus turn off and the game keeps running. Nothing crashes.

For mod developers

Your mod compiles against one small API jar that contains no Minecraft classes. You describe your screens with plain Java widgets, and the library draws them with the running version’s own GUI classes, so they look like vanilla on every version.

Widgets: Button, Label, StatusLine, Toggle, Checkbox, Cycle, Dropdown, SelectList, Slider, NumberField, TextInput, MultiLineInput, StringListEditor, Keybind, ColorPicker, collapsible Sections, and a ConfirmDialog for destructive actions.

repositories { maven("https://maven.xichil.dev&quot;) }
dependencies { compileOnly("dev.xichil.mvui:xis-mvui-api:1.0.0") }
MultiversionUi.register("mymod", Text.translatable("mymod.name", "My Mod"), new MyMenu());
  • Your mod keeps its own values. Widgets read them through suppliers and write back through callbacks.
  • On Forge and NeoForge 1.13+, and on Fabric with Mod Menu, your menu becomes the mod list Config screen automatically.
  • The test fixtures include FakeHost, so you can unit-test your screens without launching Minecraft.

Full docs and the setup guide: https://xichil.dev/projects/xis-mvui/

Modpacks

You may include it in modpacks. Use the unmodified jar, and don’t charge for the library itself.

License

All Rights Reserved. You may use it, depend on it and include it in modpacks. See the full terms at https://xichil.dev/projects/xis-mvui/license/

常见问题

Xi’s Multiversion UI Lib 支持哪些 Minecraft 版本?

Xi’s Multiversion UI Lib 支持 Minecraft Java 版 1.7.10–26.3,共 76 个版本,可用的加载器:Fabric / Forge / NeoForge / Quilt。下载时注意选择和你游戏版本一致的文件。

Xi’s Multiversion UI Lib 怎么安装?

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

评论

登录后评论和评分

Xichil 的其他作品

查看全部 →