/Signs
TrainCartsプラグインは看板を用い、単独あるいは連結したトロッコにさまざまなアクションを行うことを可能とします。
構造と動き
看板は常に同じ記法で記述されます。一行目はあなたが単一のトロッコか、複数連結した車両か、どちらをターゲットにするかによってcartもしくはtrainのどちらかを設定します。また、同時にレッドストーン回路への返り値や、車両の来る方向なども指定することが可能です。
レッドストーン
TrainCartsの看板は、動作するためにレッドストーン信号を必要とします。ただ、これは別にレッドストーントーチなどの電源が必要というわけではなく、もし必要であればレッドストーン信号なしで動作することもできます。その場合、[train]や[cart]と同じような特殊な文を一行目に入れます。基本的に、[+train]がその役割を果たすでしょう。
| 一行目 | 説明 |
|---|---|
| [train] | デフォルト。看板の内容は、レッドストーン信号がある時にだけ動作します。 |
| [+train] | 常にオンになります。レッドストーン信号のあるなしに関わらず、看板は動作します。 |
| [!train] | 反転パワーモード。レッドストーン信号がないときに動作します。要するに、[+train]が反転しているというわけです。 |
| [-train] | 常にオフ。レッドストーン信号を完全に無視して、ほとんどの動作を行いません。基本的にswitcherサインを使う時ぐらいしか、使う機会がありません。 |
| [/train] | オンパルスモード。レッドストーン信号が入ってきたその一瞬だけ動作し、その後は再び切ってからまたつくまでうんともすんとも言いません。 |
| [\train] | オフパルスモード。オンパルスモードとは逆に、レッドストーン信号が切れたその瞬間だけ動作します。 |
| [/\train] | チェンジパワーモード。[/train]と[\train]をくっつけたような感じで、レッドストーン信号がオン・オフを切り替えたその一瞬だけ反応します。 |
レバー出力
看板はその看板のあるブロックと同じブロックにレバーを接続することにより、なにかしらのアウトプットを行うことができます。駅に列車が停車した時に信号を出力するstationサインなど、わずかですがいくつかのサインはレバーを動作させます。
動作の方向
初期状態では、看板は列車が看板の前か横を向いているときに動作します。これはつまり、サインで列車の制御をしたいときは、列車の動く方向に注意を配りつつ看板を置く必要があるということです。この挙動を別のものに変更する場合、ひとつ以上の方向をコロンの後に追加することで可能です。もしどのような場合でも動くようにしたければ、[train:*]を使うとよいでしょう。
たとえば、Switcherサインにおいて[-train:lr]を使った時を例に見てみましょう。看板の指定している左か右のどちらかから列車が来た時にはレバーが作動しますが、他の場合はできないようになります。また-trainを使っているので、線路を切り替えません。
遠隔操作
いくつかのサインは遠隔操作、つまり名前で列車を操作する機能にも対応しています。その場合は、[train <列車名>](またはエイリアスとして[t <列車名>])といったフォーマットを使います。遠隔操作の時のサインはレッドストーン信号にしか反応しないので、どこにそれが設置されているのかは問いません。この機能に対応しているサインは下のほうにある看板一覧で見ることができます。
遠隔操作は複数の列車に対してあれやこれやすることも可能です。だいたいタグのような感じで、効果を及ぼす列車を*を使って識別することができます。たとえばこのようにすれば、この遠隔操作の看板はすべての『intercity』の列車の行き先をhomeに設定します。
これを使えば、すべての列車を簡単に回収することもできます。列車の案内にタグを使うなら、逆に列車を戻すためのタグを使うことも可能です。
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 | Vaultプラグインと連携して、乗客が乗車料金を支払えるようにします。(コマンドおよびPropertyのTicketsとは異なります) | 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.
