TrainCarts/控制牌

From BergerHealer Wiki
Revision as of 05:07, 2 September 2024 by Halogly (talk | contribs)
Jump to navigation Jump to search
Other languages:
English • ‎Español • ‎Nederlands • ‎中文(中国大陆)‎

« 返回

TC 允许你使用告示牌来为列车或者单个矿车执行操作。

结构和行为

几种控制牌语法格式

控制牌的格式总体相同。第一行基本总是为 carttrain,选择哪种取决于你希望选择的是单个矿车还是一整列车。之后,列车前往的方向(即列车驶出控制牌的方向)则会取决于红石信号激活控制牌时输入的方向(简单来说,输入的方向就是驶出的方向)。

红石

TC 控制牌需要红石充能来执行功能。这意味着如果你不通过红石信号激活来控制牌,它就只是个普通告示牌。如果你不想使用红石信号来激活,并且控制牌还能够运行,你可以在告示牌的第一行输入 [+train]


TC 控制牌充能模式
第一行 解释
[train] 默认模式。当使用红石信号激活时才会运作。
[+train] 持续模式。控制牌会一直运作,不需要红石信号激活。
[!train] 反转模式。与非门相同,当用红石激活时不运作,不激活时运作,无红石信号下工作状态与 [+train] 相同。
[-train] 无法充能模式。控制牌不接受红石信号,只适用于switcher(转辙器)控制牌
[/train] 脉冲模式。控制牌只会在充能由时激活一次,不会对经过的列车作出反应。
[\train] 脉冲模式。控制牌只会在充能由时激活一次,不会对经过的列车作出反应。
[/\train] 感应切换模式。控制牌只会在充能和不充能切换时激活一次,不会对经过的列车作出反应。

拉杆输出

控制牌可以通过 拉杆 来间接输出红石信号并激活其他相邻的控制牌。只有少数类型的控制牌才能使用此功能,比如当列车在station(车站)控制牌上方停止时就会激活拉杆。

激活方向

默认情况下,只有列车看到控制牌的正面和侧面时,控制牌才对列车有效。这意味着控制牌面对的方向应该是矿车驶来的方向。要覆盖此功能,你可以在第一行添加(:)英文冒号后跟一个或多个方向。如果你想让控制牌响应所有方向,可以使用 [train:*]

举个栗子,某个 switcher(转辙器)控制牌上使用 [-train:lr],当列车从左侧或右侧进入时控制牌会激活左侧和右侧的拉杆,其他方向的拉杆不作反应。此控制牌使用 -train 以便它不会切换道岔

远程控制

少数类型的控制牌系统支持远程控制:通过名称控制列车。你需要使用 [train <名称>] 格式,或使用缩写 [t <名称>]。远程控制控制牌仅对红石信号的变化做出反应,因此放置他们的位置并不重要。目前为止,属性、目的地、破坏、弹出和放置方块控制牌都系统支持远程控制。

Remote control can also affect multiple trains. Just like the tag system, remote control uses *-signs to identify the trains to affect. For example, the following remote control sign will set the destination to home for all intercity trains:

Signtemplate.png
[train Intercity*]
property
destination
interhome

You can use this to recall all your trains easily. If you use tags to navigate trains, you can also add a tag saying that the train should return.

Placement

Empty minecarts are blocked
Trains are switched left and right using a 1:1 counter

Each sign targets a certain track piece above. Signs attached to walls take the block they are attached to and look up until they find a piece of track. That track is then used for that sign. Sign posts look up until they find a piece of track. There may not be blocks without signs between the bottom sign and the tracks.

You can make a pillar of blocks below a single track piece and attach signs to it, to make a bundle of actions on a single track piece. Trains look down when they enter a new track piece to check for signs, so make sure you put the output signs above the signs that use this output for correct results.

A noticeable exception would be add-ons for the TrainCart plugin, which may change the (relative) position a sign would need to be placed on in order to work for the track. For example, would the TC Hang Rail add-on require you to add the signs above the Hang rail track to work, while the TCC (TrainCarts Coasters) add-on uses the block of a node for the sign, which can be moved to any other block.

For most signs the sign direction influences what happens, as also discussed earlier (Activation Direction):

  • The train has to face the text on the sign to make the sign respond
  • Signs with the same alignment as the tracks (faces to or away from the tracks) always respond
  • The train is spawned in the direction the sign faces


Types

  • Animate - play an animation configured in the train's attachments
  • Announce - sends a message to players in the cart and/or train above
  • Blocker - blocks trains coming from a certain direction
  • Block Changer - change the block types displayed in a minecart
  • Craft - crafts items inside the storage minecarts of a train using a nearby workbench
  • Destination - marks a destination for the path finding and sets the next destination for the train
  • Destroy - destroy trains
  • Detector - detect trains on a set region of rails
  • Effect - plays a particle or sound effect at the minecart, train or sign
  • Eject - eject trains (let passengers exit)
  • Elevator - teleports trains including passengers up and down to another elevator
  • Enter - lets nearby players and/or mobs enter the train
  • Flip - Lets you flip a cart 180 degrees
  • Launcher - launch or brake trains to start moving at a desired speed
  • (Smart) Mutex - prevents train collisions at intersections by blocking multiple trains from entering the same area
  • Property - set properties on the train such as tags, destinations and owners
  • Skip - skips execution of signs up ahead based on statements
  • Sound - plays a named sound effect
  • Spawn - spawn an entire train, cart types can be set
  • Station - stop and launch trains
  • Switcher - switch levers and rails based on properties on the train
  • Teleport - teleport trains including passengers (requires MyWorlds)
  • Transfer - transfer items between trains and chests/furnaces/dispensers
  • Trigger - display train information and a countdown of the arrival time of trains on signs (requires SignLink)
  • Ticket - let passengers pay for a ride (requires Vault)
  • Waiter - waits the train until the track is clear of other trains

Permissions

Each sign has a separate build permission. See the main permissions page. For using remote control, the player requires the train.build.feature.remotecontrol permission which is OP-only by default.