跳到正文

EgEhE’s Shared Library

作者:EgEhE

It is a library that contains all the code I want to add to certain tools, all in a single resource pack.

收藏

截图

介绍

中文介绍正在准备中,下面暂时显示原文。

⚠️ 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.

常见问题

EgEhE’s Shared Library 支持哪些 Minecraft 版本?

EgEhE’s Shared Library 支持 Minecraft Java 版 1.20.1–1.20.4,共 2 个版本。下载时注意选择和你游戏版本一致的文件。

EgEhE’s Shared Library 怎么安装?

把下载的 .zip 文件(不用解压)放进游戏目录的 resourcepacks 文件夹,进游戏后在「选项 → 资源包」里把它移到右边启用。

评论

登录后评论和评分

EgEhE 的其他作品

查看全部 →