TrainCarts [zh]

From BergerHealer Wiki
Revision as of 07:47, 10 October 2025 by Halogly (talk | contribs) (Created page with "插件提供大量命令用于允许玩家调整列车或单个矿车的运行属性。")
Jump to navigation Jump to search
TrainCarts
TrainCarts train 1.gif
Minecarts redefined
Spigot: TrainCarts
GitHub: TrainCarts


« 返回

由Bergerkiller開發的 Traincart 插件(以下簡稱 TC)涵蓋了 Minecraft 中有關礦車的一切內容。其最初目的是為了將多個礦車編組,使其能像現實中的列車一樣運行。隨着時間的推移,該插件逐漸推出更多功能,如控制牌命令列車屬性附件等。同時,插件還提供了多個API接口,便於其它插件實現更多自定義功能

列車

首先,通過 TC 可以將多個礦車連接在一起,編組為一輛無限長度的列車。這輛列車中的每個礦車將被插件定義為一個「成員」,所有成員組成的列車稱之為「」,每個成員都會和組內的其它成員共享運行狀態和信息,所以,當第一個礦車撞到障礙物時,組內的所有礦車都會停下來。同樣,當推動整輛列車時,由於外力需要克服整輛列車的摩擦力,所以長編組列車的反應速度比短編組慢。

默認所有由玩家放置的礦車都是 TC 管理的礦車。如果你想生成具有原始 Minecraft 物理行為的原版礦車,你可以通過權限或通過使用發射器來生成。更多信息請參閱原版礦車

默認生物不會進入 TC 礦車。如果你想更改此設置,請參閱生物進入或生成原版礦車。

生成

列車可以通過玩家使用列車生成箱生成,或是使用生成牌來自動化生成。

» 生成

» 列車生成箱

列車屬性

列車和單個礦車都具有各項屬性。可通過命令(/train 和 /cart)來設置或使用屬性牌進行更改。

» 屬性牌

新物理特性

列車可以在壓力板上方梯子側面行駛,也可以在方塊下方放置的鐵軌上倒懸運行

» 物理特性

告示牌

可通過大量不同功能的控制牌來實現車站的自動化,自動彈出乘客,自動讓玩家乘入列車或在運行中修改列車的各項屬性。

» 控制牌

命令

插件提供大量命令用於允許玩家調整列車或單個礦車的運行屬性。

Command Selectors

You can use command selectors like @train and @ptrain in all other commands (including non-traincarts commands) to perform actions on trains or player passengers of trains based on selector criteria. For tighter integration with other plugins like economies and status effects, this is the ideal mechanism.

Path finding

Trains can have a destination set, after which switcher signs will automatically switch the track to lead the train towards it with the shortest route possible. This can be used to automate a large train network, sending trains to different stations fully automatically. It is also possible to configure a list of destinations the train should visit and have the train automatically go from one destination to the next.

Tickets

Train ticket items can be used to restrict who can enter trains. They can also be used to assign properties to trains when used, such as assigning a destination to go to.

Configuration

TrainCarts can be configured in the config.yml file. All setting nodes have a header to help you understand what that particular node adjusts. Other than that, you can set the default train properties (properties applied to new trains) in the DefaultTrainProperties.yml file. The nodes should speak for themselves. Try not to touch the other files, as it can cause corrupted save data, or the plugin getting out of sync. Deleting the files should re-set TrainCarts completely, may one of the files get corrupted. The plugin automatically generates all configuration needed.

Attachments

The attachment editor is used to configure the appearance of your train. The interactive menu enables players to configure customized trains using item models, entities, seats, sounds and more. All of these can be animated to bring the train alive.

Permissions

Like in all plugins that use BKCommonLib as a base, all permissions can be found in PermissionDefaults.yml in the plugin folder. There they are all listed together with a description and permission default, which you can alter as well.

Performance

Some features by this plugin may result in server or client lag. There are ways to prevent them.

API and Add-ons

TrainCarts has a flexible API which allows other plugins to implement custom track, signs, attachments and more.

Useful Links

Traincarts Spigot Jenkins GitHub

BKCommonLib Spigot Jenkins GitHub

TC Coasters Spigot Jenkins GitHub

Depreciated Addons

(No longer supported in current versions of Traincarts)

ActionBlocks, added block-based systems to the game. They were dumbed-down versions of the sign systems mentioned above.