关于 Framework 模组





📙 关于:
Framework 是一个旨在帮助开发多平台模组的库,包含注册系统、网络消息系统等。此外,Framework 还包含更多功能,可进一步释放模组开发的潜力,详情请见下文。

🚀 开放模型格式
开放模型格式是原版 JSON 方块模型格式的扩展。它移除了对方块模型设计施加的任意限制,这意味着你现在可以将元素旋转到任意角度,而不再局限于 22.5 度的增量。它还允许元素的位置和尺寸超出最大边界 [-16,-16,-16] 到 [32,32,32]。下面是一个载具模组中使用的直升机模型示例。

🔑 同步数据键
同步数据键是对 Minecraft 实体数据访问器系统的改进。它允许你为任意实体附加额外数据,而无需编写复杂的 capability。使用 Framework 同步数据键的好处在于它提供的强大功能。正如名称所示,数据可以自动同步到客户端;这意味着你无需处理数据包。数据可以保存到实体上,因此能在世界重新加载或服务器重启后保留。与 Minecraft 的系统不同,Framework 增加了一个选项,允许你的数据在死亡后继续保留,而不是被重置为默认值。还没被说服?看看下面的示例,了解这个系统有多么简单而强大。
一个记录鸡被玩家击中次数的示例。
// 创建一个同步数据键 private static final SyncedDataKey<Chicken, Boolean> HITCOUNT = SyncedDataKey.builder(SyncedClassKey.CHICKEN, Serializers.INTEGER) .id(new ResourceLocation("yourmodid", "hitcount")) .defaultValueSupplier(() -> 0) .saveToFile() .syncMode(SyncMode.TRACKINGONLY) .build(); // 在你的通用设置中调用 FrameworkAPI.registerSyncedDataKey(HITCOUNT); // 玩家攻击实体时触发的 Forge 事件 void onHitEntity(AttackEntityEvent event) { if(event.getTarget() instanceof Chicken chicken) { int newCount = HITCOUNT.getValue(chicken) + 1; HITCOUNT.setValue(chicken, newCount); } }
📦 简易登录数据包
Forge 允许开发者创建登录数据包,但实现它需要大量代码。Framework 将所需代码浓缩为一个简单的注册方法,并会处理将你的数据发送给客户端的工作。

📔 开发者:
阅读此处的功能介绍,了解 Framework 如何为你的开发带来益处。

🙋♀️ 需要支持?加入官方 Discord 服务器:
评论区不太适合寻求支持,请加入官方 discord 服务器。你可以获得安装和配置模组的帮助、解决崩溃问题等等!此外,你还能(在其他任何地方之前)获取有关模组更新和开发的新闻。

如何安装 Framework
With Millida Launcher
Install Millida Launcher
The launcher is free: download it at millida.net/launcher and sign in with any nickname.
Click “Install” on this page
The launcher opens and installs the mod for Minecraft 1.20.1–26.2 on Fabric, Forge or NeoForge automatically.
Launch the game
A profile with it appears in the launcher: click “Play”.
Manually
Install Fabric, Forge or NeoForge
The loader must match the game version of the mod file, for example Minecraft 26.2. After installing it, a separate profile appears in your launcher.
Download the file for your version
In the version list above, pick the file framework-fabric-26.2-0.13.26.jar (1.7 MB) for your game version and loader.
Put it in the mods folder
The folder is inside .minecraft (Windows: %appdata%\.minecraft\mods). If it does not exist, create it.
Launch the loader profile
Open “Mods” in the main menu: Framework should be in the list.
版本
含依赖项
| Minecraft | 加载器 | 文件 | 日期 | 操作 |
|---|---|---|---|---|
| 26.2 | Fabric | Framework 0.13.261.7 MB 84 | ||
| 26.2 | NeoForge | Framework 0.13.26505 KB 11 | ||
| 26.1.2 | Fabric | Framework 0.13.22502 KB 11 | ||
| 26.1.1 | NeoForge | Framework 0.13.22502 KB | ||
| 1.20.1 | Forge | Framework 0.8.0375 KB 322 |
常见问题
Which Minecraft versions does Framework work on?
There are files for 26.2, 26.1.2, 26.1.1, 1.20.1. The newest is 26.2.
Is Framework for Forge or Fabric?
There are files for Fabric: 26.1.2–26.2, for Forge: 1.20.1 and for NeoForge: 26.1.1–26.2.
Does Framework need other mods?
The author lists no required dependencies: the Fabric, Forge or NeoForge loader is enough.
Where can I download Framework safely?
On this page: the file framework-fabric-26.2-0.13.26.jar (1.7 MB) is stored on Millida’s server, with no link shorteners. SHA-1 checksum: e11e02bf58b3e8daa930f0936109198735fe92d4.
评价
成为第一个评价 Framework 的人

