⚠️ 仅安装此源包不会产生任何效果 ⚠️
创建本库是为了更轻松地更新动态受电弓等功能。如需更多信息,请访问 GitHub 仓库。
动态受电弓 (MTR / JCM)
这一切始于我想让 Blockbench 模型中的受电弓具备动态效果。后来,我希望确保其不仅兼容 MSD 模式,还能兼容受电弓模式和导线模式,且效果非常出色。无论如何,我将自己在 Blockbench 中创建的受电弓放入文件夹并命名为 p1、p2、p3 和 pbase,但 Blockbench 导出时不会将 OBJ 文件保存至这些组中。因此,我创建了一个简单的 objgroupfix.js 脚本,轻松解决了分组问题。
分享此内容是为了让使用 Blockbench 制作的列车也拥有动态受电弓。
原始动态受电弓库由 HarryTheCat 开发。推荐查看该项目。
实际功能说明
- 首先,它会检查 MSD 接触网系统。如果未找到导线,则尝试使用 “Create: Pantographs & Wires” 命令。如果两者均未安装,或者 JCM 的脚本限制阻止了访问,它将停留在固定高度,并在聊天窗口中报告原因。该固定高度的值也可以在配置文件开头进行修改。
- 当列车不在线路上运行时(即在车库中),受电弓会自动降至休息高度;如果需要,可以调整或禁用此设置。
- 哪些车辆配备受电弓以及其安装位置,位于脚本顶部的配置表中。
关于 PAW 回退机制
读取 PAW 的接触网数据需要原始 Java 类访问权限,而 JCM 默认会阻止此类操作。如需启用:
disableScriptRestrictions = true
许可证
MIT — 详见本仓库中的 LICENSE。
⚠️ INSTALLING THIS SOURCE PACKAGE ON ITS OWN WILL NOT DO ANYTHING ⚠️
This library was created to make it easier to update features such as the dynamic pantograph. For more information, visit the GitHub repository.
Dynamic Pantograph (MTR / JCM)
It all started because I wanted to make the pantograph in my Blockbench model dynamic. Later, I wanted to ensure compatibility not only with the MSD mode but also with the pantograph and wire modes, and it works really well. Anyway, I then placed the pantograph I created in Blockbench into the folders as p1, p2, p3, and pbase, but the Blockbench export doesn’t save the OBJ files into those groups. So I created a simple objgroupfix.js script, which easily solved the grouping issue.
I'm sharing this so that the trains made with Blockbench also have dynamic pantographs
The original dynamic pantograph library was developed by HarryTheCat. I’d recommend checking it out.
What it actually does
- First, it checks the MSD catenary system. If it cannot find a wire, it tries the “Create: Pantographs & Wires” command instead. If neither is installed, or if JCM’s scripting restrictions prevent access, it stops at a fixed height and reports the reason in the chat window. The value of this fixed height can also be changed at the beginning of the config file.
- When the train is not on a route (while in the depot), the pantograph automatically lowers to the resting height; this setting can be adjusted or even disabled if desired.
- Which vehicles get a pantograph, and where it's mounted, is a config table at the top of the script.
About the PAW fallback
Reading PAW's catenary data needs raw Java class access that JCM blocks by default. If you want it:
disableScriptRestrictions = true
License
MIT — see LICENSE in this repo.
评论 0
登录后参与评分
还没有评论,来抢沙发吧