AE2AddonLib
一款辅助 AE2 模组开发者将其模组融入 AE2 生态的库。
注册表(Registry)
添加了多个类,提供辅助函数以简化注册流程。
注册变得轻而易举:只需创建你的类,并为每个需要注册的项目添加一行代码,调用一个能为你处理所有事务的方法即可。
无需再摆弄延迟注册表(deferred registers),容器类已为你自动创建,保存着你未来可能需要的一切。使用 AE2 的“定义(Definitions)”来处理一切,以及父模组中不存在的两个新增项:材料(Materials)和流体(Fluids)!
还有用于帮助你处理快捷键和设置(即左侧菜单按钮)的类。
小部件(Widgets)
本模组解锁了多个原本被锁定的 AE2 小部件。一些示例如下:
AddonIconButton- 用于通用 UI 按钮。AddonActionButton- 用于具有固定外观和工具提示的多用途按钮。AddonSettingToggleButton- 用于切换/循环机器设置的按钮。ServerSettingToggleButton- 以更易用的方式实现,只需在AddonSettingToggleButton中使用静态方法来创建按钮即可。所有数据包均由库处理,非常简单!
本库还 ADDs 了 AE2 中不存在的新小部件!示例包括:
AddonSlider- Minecraft 滑动条的扩展版,具备 AE2 风格的附加功能,并与 WidgetContainer 兼容。ColorPicker- 完整的颜色选择器,包含用于选择色调/饱和度/明度的子小部件,以及通过十六进制代码输入的功能。ToolbarActionButton- 因为并非所有左侧工具栏操作都需要切换设置!此按钮可根据你的需求进行配置。FluidTankSlot- 带有配套类的组件,用于为你的界面添加流体槽位。
屏幕(Screens)
本库还提供了两个通用目的的屏幕:
OutputDirectionScreen- 用于让玩家决定希望机器将物品输出到何处。SetAmountScreen- 一个显示 ItemStack 并提供按钮以更改数量的屏幕,类似于合成请求屏幕!
网络通信(Networking)
提供了一个 NetworkHandler,其中包含辅助方法,便于你轻松注册数据包。库还提供并处理了一些数据包,例如用于处理流体槽位和切换设置的数据包。对于 1.20.1 版本,网络处理器还提供了发送数据包所需的所有必要工具,这些功能在 Forge 中并不直接可用。
工具类(Utility)
该库还包含一些杂项实用类,例如:
Colors- 便捷的颜色类,支持 RGB/ARGB/HSV 之间的转换。内置了所有原版颜色和最常用的 AE2 颜色。BlockUpgradeItem- 用于升级实体的物品的通用基类,例如升级图案提供者。WaterBasedFluidType- 任何使用水纹理的流体的基类。AddonEnum- 可附加到枚举的接口,提供一种与其他模组交互的简便方法。用于检查它们是否已加载或创建条件配方。AE2AddonModelProvider-AE2BlockStateProvider的扩展版,解锁了用于插件资源位置的方法。还包括用于轻松创建完整方块图案提供者或部分物品模型(用于总线或电缆图案提供者)的附加方法,以及具有两层结构的彩色物品。ConnectedTexturesBaseBakedModel- 一个已完成烘焙的连接纹理模型。高度可配置,支持面渲染类型、侧面渲染类型以及自发光效果的自定义。
文档(Documentation)
该库拥有 100% 的 Javadoc 文档。文档内容将持续改进和完善。库本身也包含一些使用示例。你还可以查看 AdvancedAE's GitHub 页面,这是一个几乎使用了该库所有功能的模组。
贡献(Contributing)
虽然该库已经处于良好的起步阶段,但它无疑可以进一步发展,成为更强大的开发工具。欢迎提出建议或反馈,我们非常感激。你的意见非常有价值,将使这个工具对所有人更好。
AE2AddonLib
A library to help AE2 Addon developers bring their mods into AE2 ecosystem.
Registry
Several classes were added to provide helper functions to make registering easier.
Registering becomes as easy as creating your class and adding a line for each thing you want to register calling a method that handles everything for you.
No messing with deferred registers, container classes are created for you, holding everything you might need in the future. Using AE2's "Definitions" for everything, as well as two additions, not present in the parent mod: Materials and Fluids!
There are also classes to help you handle your hotkeys and settings (for those left side menu buttons).
Widgets
This mod opens up several otherwise locked AE2 widgets. Some examples:
AddonIconButton- for general-use UI buttons.AddonActionButton- for multiple-use buttons that have a set appearance and tooltips.AddonSettingToggleButton- for buttons that toggle/cycle machine settings.ServerSettingToggleButton- Implemented in an easier to use way, simply use the static method inAddonSettingToggleButtonto create the button. All packets are handled for you, easy!
This library also ADDs new widgets, not present in AE2! Examples are:
AddonSlider- An extension of minecraft's sliders with added features made in AE2 style and compatible with WidgetContainer.ColorPicker- A complete color picker with child widgets for selecting hue/saturation/value as well as input via hex codes.ToolbarActionButton- Because not all left toolbar actions need to toggle settings! This one can be configured for your needs.FluidTankSlot- A widget with companion classes to add fluid tanks for your interface.
Screens
This library also provides two general purpose screens:
OutputDirectionScreen- Used to let the player decide where they want the machine to export their items.SetAmountScreen- A screen that displays an ItemStack and buttons to change the amount, like the crafting request screen!
Networking
A NetworkHandler is provided with helper methods to easily register your packets. Some packets are provided and handled by the lib, such as the packets used to handle fluid slots and toggling settings. For the 1.20.1 version, the network handler also provides all necessary tools to send your packets, which aren't available through forge.
Utility
The library also contains some miscellaneous useful classes, such as:
Colors- Nice color with conversion to and from RGB/ARGB/HSV. Comes with all vanilla colors and most common AE2 colors built-in.BlockUpgradeItem- General base class for an item that upgrades entities, i.e. upgrade a pattern provider to another.WaterBasedFluidType- Base class for any fluid that uses water textures.AddonEnum- Interface that can be attached to an enum for an easy way to handle interactions with other mods. Used to check if they are loaded or create conditional recipes.AE2AddonModelProvider- Extension ofAE2BlockStateProviderthat unlocks methods for addon resource locations. Includes additional methods for easily creating full block pattern providers or partItem models (for buses or cable pattern providers), as well as colored items, with two layers.ConnectedTexturesBaseBakedModel- A completed baked model for connected textures. Highly configurable, up to the render types of both face and sides, as well as emissivity.
Documentation
The lib is 100% documented with javadoc. It can, and will, be improved upon. There are also some usage examples in the lib itself. You can also see AdvancedAE's github page, for a mod that uses almost every feature the lib has to offer.
Contributing
While the lib is at a great starting point, it can definitely grow and become an even more powerful development tool. Suggestions/Complaints are always welcome and appreciated. Your input is valuable and will make this tool better for everyone else.
下载 AE2AddonLib
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 AE2AddonLib
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 AE2AddonLib
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 AE2AddonLib
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 AE2AddonLib
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 AE2AddonLib
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 AE2AddonLib
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 AE2AddonLib
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 AE2AddonLib
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 AE2AddonLib
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
- 修复了升级物品删除 NBT 数据的问题
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
一个用于收集生物掉落物的多区块模组。
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
查看物品与配方
模组
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
模组
适用于 MC 1.18+ 的 Effekseer 加载器
模组
添加区块认领和玩家组队功能,并与 Xaero's Minimap 和 World Map 集成
评论 0
登录后参与评分
还没有评论,来抢沙发吧