TrainCarts/zh: Difference between revisions
(Created page with "» 命令选择器") |
(Created page with "== 寻路 ==") |
||
Line 50: | Line 50: | ||
[[Special:MyLanguage/TrainCarts/Commands/Selectors|» 命令选择器]] | [[Special:MyLanguage/TrainCarts/Commands/Selectors|» 命令选择器]] | ||
== 寻路 == | |||
= | |||
列车可设置一个'''目的地''',随后'''转辙器'''会根据目的地'''自动切换轨道''',以最短的路线将列车发往目的地。通过此功能可实现大型铁路网的自动化管理,将列车自动发送至不同目的地。同时,还可配置列车的'''目的地列表''',让列车自动从一个目的地前往下一个目的地,实现路径点功能。 | |||
<div lang="en" dir="ltr" class="mw-content-ltr"> | <div lang="en" dir="ltr" class="mw-content-ltr"> |
Revision as of 07:49, 10 October 2025
![]() | |
Minecarts redefined | |
Spigot: | TrainCarts |
---|---|
GitHub: | TrainCarts |
由Bergerkiller开发的 Traincart 插件(以下简称 TC)涵盖了 Minecraft 中有关矿车的一切内容。其最初目的是为了将多个矿车编组,使其能像现实中的列车一样运行。随着时间的推移,该插件逐渐推出更多功能,如控制牌、命令、列车属性、附件等。同时,插件还提供了多个API接口,便于其它插件实现更多自定义功能。
列车
首先,通过 TC 可以将多个矿车连接在一起,编组为一辆无限长度的列车。这辆列车中的每个矿车将被插件定义为一个“成员”,所有成员组成的列车称之为“组”,每个成员都会和组内的其它成员共享运行状态和信息,所以,当第一个矿车撞到障碍物时,组内的所有矿车都会停下来。同样,当推动整辆列车时,由于外力需要克服整辆列车的摩擦力,所以长编组列车的反应速度比短编组慢。
默认所有由玩家放置的矿车都是 TC 管理的矿车。如果你想生成具有原始 Minecraft 物理行为的原版矿车,你可以通过权限或通过使用发射器来生成。更多信息请参阅原版矿车。
默认生物不会进入 TC 矿车。如果你想更改此设置,请参阅生物进入或生成原版矿车。
生成
列车可以通过玩家使用列车生成箱生成,或是使用生成牌来自动化生成。
列车属性
列车和单个矿车都具有各项属性。可通过命令(/train 和 /cart)来设置或使用属性牌进行更改。
新物理特性
列车可以在压力板上方和梯子侧面行驶,也可以在方块下方放置的铁轨上倒悬运行。
告示牌
可通过大量不同功能的控制牌来实现车站的自动化,自动弹出乘客,自动让玩家乘入列车或在运行中修改列车的各项属性。
命令
插件提供大量命令用于允许玩家调整列车或单个矿车的运行属性。
目标选择器
您可以在其他所有命令(包括非 TC 命令)中使用目标选择器(如 @train 和 @ptrain)。使用对应的选择器来对列车或列车上的乘客执行操作。该功能令TC能够更好地兼容其他插件(如经济和状态效果插件),非常重要。
寻路
列车可设置一个目的地,随后转辙器会根据目的地自动切换轨道,以最短的路线将列车发往目的地。通过此功能可实现大型铁路网的自动化管理,将列车自动发送至不同目的地。同时,还可配置列车的目的地列表,让列车自动从一个目的地前往下一个目的地,实现路径点功能。
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.
- TC-Coasters: Adds smooth rollercoaster track to TrainCarts
- TC-Hangrail: Hang below or float above any kind of block as fake track
- TrainCartsDestinationSelector: Adds clickable signs so players can select train destinations
- Traincarts AdvancedSigns: Adds additional sign types, particularly useful for rollercoaster rides
- TC Minecart Variants: Unique models for carts showing different types of resources (coal, gold, etc.)
- TCAnimatronics: Play Animatronics animations with a Traincarts sign
Useful Links
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.