TrainCarts/Signs [zh-sg]

From BergerHealer Wiki
Revision as of 03:28, 6 November 2025 by Halogly (talk | contribs) (Created page with "使用TrainCarts自身的附加插件时需要注意,因为它们可能会改变控制牌生效的(相对)位置。例如,'''TC Hang Rail'''(悬挂轨道)要求将控制牌放置在悬挂轨道的上方;而'''TCC(TrainCarts Coasters)'''将节点所在的方块作为控制牌的附着点,且该节点可被移动至任意其他方块。")
Jump to navigation Jump to search

TC可以通過使用告示牌來為列車或單個礦車執行操作。

結構與行為

幾種控制牌的語法格式。

控制牌的格式始終遵循統一的結構。首行需標註carttrain,用於指定控制對象是單個礦車還是整條列車。隨後可選擇性設置控制牌對紅石信號的響應方式,以及接收紅石信號的方向(此方向即為礦車駛出的方向)。

紅石

控制牌需通過紅石信號激活使用。如果不使用紅石來激活控制牌,它就只是一個普通的告示牌。如果不想紅石來激活且控制牌依然能夠運行,可將告示牌的第一行改為[+train]


控制牌充能模式
第一行 釋義
[train] 默認模式。當使用紅石信號激活時才會運作。
[+train] 激活模式。控制牌會一直運作,無需紅石信號激活。
[!train] 反轉模式。類似於非門,被紅石信號激活時不運作,無信號時運作,無紅石信號激活時工作狀態與[+train]相同。
[-train] 無法充能模式。控制牌不接受紅石信號。該功能只適用於轉轍器
[/train] 上升沿模式。控制牌只會在紅石信號由時工作一次,不會對經過的列車作出反應。
[\train] 下降沿模式。控制牌只會在紅石信號由時工作一次,不會對經過的列車作出反應。
[/\train] 雙邊沿模式。控制牌在紅石信號切換激活和不激活時工作一次,不會對經過的列車作出反應。

拉杆輸出

控制牌可切換拉杆來間接輸出紅石信號並激活其他相鄰的控制牌。只有少數類型的控制牌才具有此功能,例如列車停在車站牌上方時就會切換拉杆。

激活方向

默認情況下,列車只有能看到控制牌的正面或側面時,該控制牌才能對列車生效。因此,要使控制牌起效,控制牌應當面對礦車駛來的方向。要覆蓋此功能,你可以在第一行添加「:」(英文冒號),後跟一個或多個方向參數。如果你想讓控制牌在所有方向上都能生效,可使用通配符,用法:[train:*]

示例:某道岔牌上寫入[-train:lr],當列車從左側或右側進入時,控制牌會切換左側和右側的拉杆,使其進入激活狀態,而其他方向的拉杆不作反應。此控制牌使用-train來關閉道岔牌切換鐵軌的功能。

遠程控制

少數類型的控制牌支持遠程控制:通過名稱控制列車。用法:[train <名稱>],或使用縮寫 [t <名稱>]。遠程控制牌僅對紅石信號的開關變化作出反應,因此放置的位置並不重要。類型表列出的是支持遠程控制的控制牌。

遠程控制可操作多輛列車。與標籤相同,遠程控制使用「*」來表示要操作的列車。例如,下面的控制牌會將所有名為「intercity」的列車的目的地設置為home

Signtemplate.png
[train Intercity*]
property
destination
interhome


你可以用它來輕鬆調用所有列車。如果你使用標籤來調度列車,你也可以添加新標籤來讓列車返回。

放置

空礦車被阻擋。
列車按1:1的比例自動分配到左側與右側。

控制牌會在當前位置向上尋找鐵軌作為控制對象。而放置在方塊側面的控制牌會在附着方塊的位置向上尋找鐵軌作為控制對象。控制牌柱同樣是向上尋找鐵軌,但位置更下的控制牌和鐵軌之間必須要有控制牌附着的方塊。

可以在單個鐵軌下方搭一個方塊柱子,在柱子側面放置多個控制牌,這樣就能在一個鐵軌上執行多個操作。列車進入該鐵軌時按從上到下的順序執行控制牌,因此,若有輸出紅石信號的控制牌,請儘可能將其放置在最上方,確保依賴該紅石信號的其他控制牌可以正常運作。

使用TrainCarts自身的附加插件時需要注意,因為它們可能會改變控制牌生效的(相對)位置。例如,TC Hang Rail(懸掛軌道)要求將控制牌放置在懸掛軌道的上方;而TCC(TrainCarts Coasters)將節點所在的方塊作為控制牌的附着點,且該節點可被移動至任意其他方塊。

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.