执行摘要
Pixel MK Menu 是一款面向客户端的图形用户界面(GUI)模组。它改变了主菜单、按钮、暂停菜单以及其他各类 GUI 的外观。
目录
简介
Minecraft 的主菜单及其他菜单并不够现代、简洁或美观。
从菜单编辑器模组、GUI 重设计模组以及其他模组 GUI 的流行程度可以看出,
原版菜单往往不尽如人意。这种对菜单进行改造的需求,以及即将发布的 Pixel MK 4 整合包,填补了此前由 Voxel Modpack 移植过来的 Voxel Menu 模组在 Pixel MK 1 和 2 中留下的空白。
本模组是该模组的移植版/继任者,重新设计了菜单,并引入了现代化的模组支持以及对 Forge 的支持。
变更内容
Pixel MK Menu 目前仅更改主菜单、Create 的主菜单
(如果加载了 Create)以及暂停菜单。
主菜单
主菜单最多包含 10 个按钮。当与 Pixel MK Menu 同时启用/安装了 Create 和 Quark 时,
通常按钮数量仅为 8 个。
默认菜单

如您所见,主菜单看起来更加简洁精致。这种现代感
直接反映了整个整合包的风格,并通过资源包等方式在整合包中得以体现。如果不喜欢该菜单,可以将其移除且不会产生任何后果。
菜单上新增的一个按钮是静音按钮,用于完全禁用菜单音乐。
也可以通过配置文件来静音菜单音乐,以恢复原版菜单音乐。
此外,还可以通过 JSON 文件在主菜单左上角添加整合包定义,为菜单增添一点额外细节。这最终也将扩展为一个完整的按钮和动态屏幕。
集成 Create 和 Quark 时

通过 Quark 和 Create 添加的按钮已内置于模组中,但任何其他按钮
都需要通过其他模组作者的判定来确定是否添加,除非通过问题跟踪器请求并获得批准。
添加方法详见 此处。
暂停菜单

暂停菜单经过重新设计,占用的屏幕空间更小,
不再使背景变暗,因此在在线游戏时更容易看清周围环境。
暂停菜单还关联了动画效果。
添加按钮
此功能在 1.20.6 中尚不存在
要添加按钮,只需在 Forge Event Bus 上捕获事件 (AddModButtonsEvent 事件) 即可。
该事件的源文件位于 AddModButtonsEvent.java。
使用的代码大致如下:
import com.pixelmk.pixelmkmenu.event.AddModButtonsEvent;
import net.minecraft.client.gui.components.Button;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.eventbus.api.SubscribeEvent;
// ...
```java
public void init() {
// ...
MinecraftForge.EVENT_BUS.addListener(this::addButton);
// ...
}
@SubscribeEvent
public void addButton(AddModButtonsEvent event) {
event.createButton("examplemod.usingStringButton",
$ -> {LOGGER.info("This button was created using a string")});
event.createButton(new TranslatableComponent("examplemod.usingComponentButton"),
$ -> {LOGGER.info("This button was created using a component")});
event.addButton(new Button("examplemod.usingMCButton"),
$ -> {LOGGER.info("This button was created using a Minecraft Button")});
}
鸣谢
许可证
MIT License
Copyright (c) 2024 Joe Targett, Pixel MK Group
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Executive Summary
Pixel MK Menu is a client side GUI mod for minecraft. It changes the main menu,
buttons, the pause menu and other miscellaneous GUIs.
Table of Contents
Introduction
The Minecraft main menu and other menus aren't that modern, sleek or beautiful.
We can see due to the popularity of menu editor mods and GUI redesign mods and
other mod GUIs that the menus leave a lot to be desired. This desire to change the
menu and the soon-to-be-released Pixel MK 4 modpack leaves a hole to be filled
that was filled with Pixel MK 1 and 2's Voxel Menu mod that was brought over from
the Voxel Modpack.
This mod serves as a port/successor to that mod, redesigning the menu and,
bringing in modern mod support as well as support for Forge.
Changes
Pixel MK Menu currently only changes the Main Menu, Create's main menu
(if Create is loaded) and the Pause Menu.
Main Menu
The Main menu has up to 10 buttons, when both Create and Quark are
enabled/installed alongside Pixel MK Menu, normally this count is only 8.
Default Menu

As you can see the main menu looks much more sleek and polished. This modernity
directly reflects the modpack as a whole and is translated into the modpack using
resourcepacks and others. For anyone who doesn't like the menu it can be removed
without consequence.
One of the new buttons on the menu is a mute button to mute menu music entirely,
the menu music can also be muted using the config to restore the original menu music.
It is also possible to add a modpack definition in the top-left corner to bring
a little extra touch to the menu using a JSON file, this will eventually also be
extended into an entire button and dynamic screen.
With Create and Quark

The Buttons added with Quark and Create are built into the mod but any other buttons
will have to be added via determination from other mod authors unless requested
and approved through the issue tracker.
The way to add this is documented here
Pause Menu

The pause menu has been redesigned to take up a smaller space of the screen and
no longer dims the background meaning that it is easier to see you surroundings
when online.
The pause menu also has animations associated with it.
Adding Buttons
This Functionality does not yet exist in 1.20.6
To add a button it is as simple as catching an event (AddModButtonsEvent event)
on the Forge Event Bus.
The file for this event can be found at AddModButtonsEvent.java.
The code used would be something along the lines of
import com.pixelmk.pixelmkmenu.event.AddModButtonsEvent;
import net.minecraft.client.gui.components.Button;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.eventbus.api.SubscribeEvent;
// ...
public void init() {
// ...
MinecraftForge.EVENT_BUS.addListener(this::addButton);
// ...
}
@SubscribeEvent
public void addButton(AddModButtonsEvent event) {
event.createButton("examplemod.usingStringButton",
$ -> {LOGGER.info("This button was created using a string")});
event.createButton(new TranslatableComponent("examplemod.usingComponentButton"),
$ -> {LOGGER.info("This button was created using a component")});
event.addButton(new Button("examplemod.usingMCButton"),
$ -> {LOGGER.info("This button was created using a Minecraft Button")});
}
Credits
-
Programming - Joe Targett of the Pixel MK team
-
Some code lifted and edited from
Pack Menu and Somnia Awoken.
-
Music by eXtaticus, Kuraishin, ph00tbag, and FelixMoog.
-
Art by Joe Targett
-
Idea by xIGBClutchIx, Mumfrey and the rest of the VoxelModPack Team.
License
MIT License
Copyright (c) 2024 Joe Targett, Pixel MK Group
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
评论 0
登录后参与评分
还没有评论,来抢沙发吧