Signs
/TC可以通過使用告示牌來為列車或單個礦車執行操作。
結構與行為
控制牌的格式始終遵循統一的結構。首行需標註cart或train,用於指定控制對象是單個礦車還是整條列車。隨後可選擇性設置控制牌對紅石信號的響應方式,以及接收紅石信號的方向(此方向即為礦車駛出的方向)。
紅石
控制牌需通過紅石信號激活使用。如果不使用紅石來激活控制牌,它就只是一個普通的告示牌。如果不想紅石來激活且控制牌依然能夠運行,可將告示牌的第一行改為[+train]。
第一行 | 釋義 |
---|---|
[train] | 默認模式。當使用紅石信號激活時才會運作。 |
[+train] | 激活模式。控制牌會一直運作,無需紅石信號激活。 |
[!train] | 反轉模式。類似於非門,被紅石信號激活時不運作,無信號時運作,無紅石信號激活時工作狀態與[+train]相同。 |
[-train] | 無法充能模式。控制牌不接受紅石信號。該功能只適用於轉轍器。 |
[/train] | 上升沿模式。控制牌只會在紅石信號由關到開時工作一次,不會對經過的列車作出反應。 |
[\train] | 下降沿模式。控制牌只會在紅石信號由開到關時工作一次,不會對經過的列車作出反應。 |
[/\train] | 雙邊沿模式。控制牌在紅石信號切換激活和不激活時工作一次,不會對經過的列車作出反應。 |
Lever Output
Signs can output a redstone signal as well by attaching a lever to the same block the sign is also attached to. Only a few signs activate the lever, like the station sign that activates it when trains stop on top of the station.
Activation Direction
By default signs only activate when the train sees the front or sides of the sign. This means you should place signs facing the direction of train movement. To override this behavior you can set these activation directions by adding a colon (:) followed by one or more directions. If you want the sign to always respond, just use [train:*].
For example, [-train:lr] on a switcher sign would activate a lever when a train enters from either the sign-relative left or right direction and doesn't for the remaining ones. It uses -train so that it does not switch the track.
Remote Control
A few sign systems support remote control: the ability to control trains by name. You then use the [train <name>] format, or the shorter alias [t <name>]. Remotely controlled signs only respond to redstone changes, thus where you place them is not important. The signs that support this feature are listed in the Types table down below.
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:
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
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
Sign | Description | Remote Control |
---|---|---|
Animate | play an animation configured in the train's attachments | Yes |
Announce | sends a message to players in the cart and/or train above | Yes |
Blocker | blocks trains coming from a certain direction | No |
Block Changer | change the block types displayed in a minecart | Yes |
Craft | crafts items inside the storage minecarts of a train using a nearby workbench | No |
Destination | marks a destination for the path finding and sets the next destination for the train | Yes |
Destroy | destroy trains | Yes |
Detector | detect trains on a set region of rails | No |
Effect | plays a particle or sound effect at the minecart, train or sign | Yes |
Eject | eject trains (let passengers exit) | Yes |
Elevator | teleports trains including passengers up and down to another elevator | No |
Enter | lets nearby players and/or mobs enter the train | Yes |
Flip | Lets you flip a cart 180 degrees | Yes |
Launcher | launch or brake trains to start moving at a desired speed | Yes |
(Smart) Mutex | prevents train collisions at intersections by blocking multiple trains from entering the same area | No |
Property | set properties on the train such as tags, destinations, enter/exit toggle and more | Yes |
Skip | skips execution of signs up ahead based on statements | Yes |
Sound | plays a named sound effect | Yes |
Spawn | spawn an entire train, cart types can be set | No |
Station | stop and launch trains | No |
Switcher | switch levers and rails based on properties on the train | No |
Teleport | teleport trains including passengers (requires MyWorlds) | Yes |
Transfer | transfer items between trains and chests/furnaces/dispensers | No |
Trigger | display train information and a countdown of the arrival time of trains on signs (requires SignLink) | No |
Ticket | let passengers pay for a ride (requires Vault) | No |
Waiter | waits the train until the track is clear of other trains | No |
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.