Repository navigation
Releases
Releases · 54895y/Custom-Main-Menu-Reload
Custom Main Menu Reload 3.0.0
Custom Main Menu Reload 3.0.0
lumien231/Custom-Main-Menu 的 Fork 版本,支持 Minecraft 1.12.2。
新增功能
按钮大小与位置自适应(百分比单位)
按钮新增 unit 字段(取值 "px" 或 "percent"),并支持逐字段覆盖(posXUnit / posYUnit / widthUnit / heightUnit)。当 unit 为 "percent" 时,posX / width 按屏幕宽度换算,posY / height 按屏幕高度换算,使按钮布局随窗口尺寸或 guiScale 自动适配。
换算公式:
posX与width:实际值 = value / 100 * 屏幕宽度posY与height:实际值 = value / 100 * 屏幕高度
示例
"myButton": {
"text": "menu.singleplayer",
"posX": -15,
"posY": 0,
"width": 30,
"height": 8,
"unit": "percent",
"alignment": "center",
"action": { "type": "openGui", "gui": "singleplayer" }
}完整字段说明请参见 Wiki - Buttons。
Bug 修复
- 修复首次进入主菜单时按钮位置/尺寸基于陈旧屏幕尺寸的问题 ——
initGui()现在会先清空按钮列表再重建,按钮始终基于当前窗口尺寸对齐。 - 修复带纹理按钮在
width/height使用percent单位时渲染比点击区域小的问题 —— 渲染现在统一使用换算后的像素尺寸。
安装方式
- 从下方资产下载
CustomMainMenuReload-MC1.12.2-3.0.0.jar。 - 将 jar 放入 Minecraft
mods/文件夹。 - 使用 Forge 启动 Minecraft 1.12.2。