
DBetterModel 6.0 "Omni":一个 JAR 包适配所有 BetterModel(1.15.x、2.x、3.x)。
演示:
可在 GitHub 上查看。
为什么是 6.0
在 5.0 及之前,我针对每个 BetterModel 版本发布一个 DBetterModel 版本。BetterModel 的 API 发生了两次重大变更(1.x → 2.x → 3.x),导致维护矩阵不断膨胀,每次 BM 更新都会让部分用户陷入困境。6.0 用一个通用的 JAR 包取代了这种模式:它在启动时检测已安装的 BetterModel 版本,并加载对应的兼容层。
| BetterModel |
DBetterModel |
| 1.15.x / 2.0.x–2.2.x / 3.x |
6.0.0 (单一 JAR 包) |
供 6.0 之前用户的参考历史版本表:
6.0 包含什么
- 通用兼容核心 — 版本中立的 API,包含三个静态编译的层(v1/v2/v3),在启动时自动选择。完全不再使用私有字段反射。对于未知的未来 BM 主版本(4.x+),采用尽力而为的检测机制,避免崩溃。
- 能力系统 — 每一层声明当前运行的 BetterModel 具备哪些功能;脚本通过
<bm.capabilities> 进行查询。任何不可用的功能都会返回清晰的错误信息,而不是堆栈跟踪。
- Blockbench 关键帧信号 —
denizen:name{key=value} 指令关键帧会在所有受支持的 BM 线条上触发 bm animation signal Denizen 事件,包括 1.15.x 和 2.x。
bmsummon — 用于道具和过场动画的位置绑定模型(虚拟追踪器),无需载体实体。
- 完整的事件套件 — 14 个脚本事件:信号、动画开始/结束、按玩家生成/消失、追踪器生命周期、碰撞箱伤害/交互、骑乘/下马、重载。
- 读写骨骼 API — 在 5.x 中仅支持写入的标签(glow, tint, billboard, view range, brightness, scale, offset, item...)现在也支持读取。
skin 骨骼机制 — 将玩家的皮肤部件作为调整项应用到骨骼上 (skin:[part=head;from=<player>]),这是 bmpart 的现代替代方案。
- 恢复旧版别名 —
world_rotation、骨骼 bm_entity、lerp_frames 重新生效,因此 3.x/4.x 时代的脚本可以无需修改直接运行。
- 100% 向后兼容 — 所有 5.0 的脚本均可无需更改地运行。
- 实验性功能 — 关键帧到脚本的桥接以及 Folia 就绪的内部实现;详见
docs/EXPERIMENTAL.md。
DBetterModel vs denizen-utilities (BetterModel bridge)
两者都将 BetterModel 桥接到 Denizen。已在 denizen-utilities 2.8.x(基于 bettermodel-bukkit-api:3.0.1 编译)上验证;下表仅列出可从源码验证的差异,并非质量评判。
|
DBetterModel 6.0 |
denizen-utilities |
| BetterModel 支持 |
1.15.x + 2.x + 3.x,一个 JAR 包 |
仅 3.x |
| BM API 访问 |
仅限公开 API |
反射访问 BM 私有字段 (RenderedBone.itemStack,通过 setAccessible) |
| 非线程工作 |
Bukkit/区域调度器 |
原始的 new Thread + Thread.sleep(100) |
关键帧信号 (bm animation signal) |
在所有 BM 线条上触发,包括 1.15/2.x |
仅 3.x |
| 位置绑定模型(虚拟追踪器) |
有 — bmsummon |
无 |
| 皮肤部件 → 骨骼 |
bmpart 命令 和 skin 机制 |
.skin 机制(他们的 bmpart 已弃用) |
| 骑乘 / 广告牌 |
命令 (bmmount, bmboard) |
机制 (.mount, .billboard) |
文档
编辑器设置 (VS Code)
Denizen 扩展的脚本检查器默认并不知晓 DBetterModel 的对象类型,因此会将 bmentity@/bmmodel@/bmbone@ 标记为未知。请教它:设置 (Ctrl+,) → 搜索 denizenscript → Denizenscript: Extra Sources → 添加
https://github.com/meigoc/dbettermodel/archive/refs/heads/main.zip
然后重载窗口。详情请参阅 FAQ。
要求
|
|
| Java |
21+(仅在运行 BetterModel 3.x 时需要 Java 25 — BM 3.x 自身要求使用) |
| 服务器端 |
Paper 1.21.x+ |
| Denizen |
1.3.1+ |
| BetterModel |
1.15.x、2.0.x–2.2.x 或 3.x |

DBetterModel 6.0 "Omni": one jar for every BetterModel (1.15.x, 2.x, 3.x).
Demo:
Available on GitHub.
Why 6.0
Up to 5.0 I shipped one DBetterModel release per BetterModel version. BetterModel broke its API twice (1.x → 2.x → 3.x), so that matrix kept growing and every BM update stranded someone. 6.0 replaces it with a single universal jar: it detects the installed BetterModel at startup and picks the matching compat layer.
| BetterModel |
DBetterModel |
| 1.15.x / 2.0.x–2.2.x / 3.x |
6.0.0 (single jar) |
Historical table for pre-6.0 users:
| BetterModel Version |
Latest Supported DBetterModel Version |
| 1.15.0 |
5.0.0 |
| 1.14.0-1.14.2 |
4.3.0 |
| 1.13.4 |
4.2.0 |
| 1.13.0-1.13.1 |
4.1.0 |
| 1.11.0 |
4.0.0 |
| 1.10.3 |
3.5.0 (abandoned, will not be released) |
| 1.10.2 |
3.4.0 |
| 1.10.0-1.10.1 |
3.3.0 |
| 1.9.0-1.9.3 |
2.1.0 |
| 1.8.0-1.8.1 |
2.0.1 |
| 1.5.5 |
1.1.0 |
| 1.5.1 |
1.0.0 |
What's in 6.0
- Universal compat core — version-neutral API with three statically compiled layers (v1/v2/v3), selected at startup. No private-field reflection anywhere. Unknown future BM majors (4.x+) get a best-effort probe instead of a crash.
- Capability system — each layer declares what the running BetterModel can do; scripts query it with
<bm.capabilities>. Anything unavailable reports a clean error instead of a stacktrace.
- Blockbench keyframe signals —
denizen:name{key=value} instruction keyframes fire the bm animation signal Denizen event on all supported BM lines, including 1.15.x and 2.x.
bmsummon — location-bound models (dummy trackers) for props and cutscenes, no carrier entity needed.
- Full event suite — 14 script events: signals, animation start/end, per-player spawn/despawn, tracker lifecycle, hitbox damage/interact, mount/dismount, reload.
- Read/write bone API — the tags that were write-only in 5.x (glow, tint, billboard, view range, brightness, scale, offset, item...) now read back too.
skin bone mechanism — apply a player's skin part to a bone as an adjust (skin:[part=head;from=<player>]), the modern take on bmpart.
- Legacy aliases restored —
world_rotation, bone bm_entity, lerp_frames work again, so 3.x/4.x-era scripts run as-is.
- 100% backward compatible — every 5.0 script runs unchanged.
- Experimental — a keyframe-to-script bridge and Folia-ready internals; see
docs/EXPERIMENTAL.md.
DBetterModel vs denizen-utilities (BetterModel bridge)
Both bridge BetterModel into Denizen. Verified against denizen-utilities 2.8.x (compiled against bettermodel-bukkit-api:3.0.1); the table lists only source-verifiable differences, not a quality judgement.
|
DBetterModel 6.0 |
denizen-utilities |
| BetterModel support |
1.15.x + 2.x + 3.x, one jar |
3.x only |
| BM API access |
public API only |
reflection into a BM private field (RenderedBone.itemStack via setAccessible) |
| Off-thread work |
Bukkit/region schedulers |
a raw new Thread + Thread.sleep(100) |
Keyframe signals (bm animation signal) |
fire on all BM lines, incl. 1.15/2.x |
3.x only |
| Location-bound models (dummy trackers) |
yes — bmsummon |
no |
| Skin part → bone |
bmpart command and skin mechanism |
.skin mechanism (their bmpart is deprecated) |
| Mount / billboard |
commands (bmmount, bmboard) |
mechanisms (.mount, .billboard) |
Docs
Editor setup (VS Code)
The Denizen extension's script checker doesn't know DBetterModel's object types out of the box, so it flags bmentity@/bmmodel@/bmbone@ tags as unknown. Teach it: Settings (Ctrl+,) → search denizenscript → Denizenscript: Extra Sources → add
https://github.com/meigoc/dbettermodel/archive/refs/heads/main.zip
then reload the window. See the FAQ for details.
Requirements
|
|
| Java |
21+ (Java 25 only when running BetterModel 3.x — BM 3.x itself requires it) |
| Server |
Paper 1.21.x+ |
| Denizen |
1.3.1+ |
| BetterModel |
1.15.x, 2.0.x–2.2.x, or 3.x |
评论 0
登录后参与评分
还没有评论,来抢沙发吧