The train spawner sign allows you to spawn complete trains. Trains are spawned to the text-side of the sign on the rails above. When it receives power while it was unpowered before, it will trace down the tracks and spawn a train on it if there are no other trains occupying the rails.
''[train]'', a spawn direction can be set by specifying trigger directions. For example: ''[train:left]'' or ''[train:right]''. If none is set, the train is spawned based on what side is powered by redstone. For automatic spawners, ''[+train]'' (always powered) is recommended.
The minecart types to spawn, using characters shown below. The resulting train will be spawned with the same types in the same order as set on the sign. To spawn many carts at once, this way spawning more than 30 Minecarts, define the number of times to spawn in front of the character. For example, ''30s60m'' spawns a train with 30 storage minecarts and 60 regular minecarts.
Will spawn 3 minecarts every 1 minute and 20 seconds at a velocity of 0.5 blocks/tick. The interval time has to be set after spawn and before the launching velocity. The automatic spawner will load a 7x7 chunk area around the sign, and spawn a minecart. Try not to set the interval too low as that may cause issues when the chunks around the signs unload a lot.
</div>
=== Spawn Limit ===
=== 生成限制 ===
To limit how many trains the spawn sign can spawn, you can set a '''spawn limit''' for a saved train. To set one, first save the train to spawn with the spawn sign (<code>/train save name</code>). Then, use the <code>/savedtrain name spawnlimit <limit></code> command to set a limit. This is useful when automatically populating a train network with trains.
要限制生成器生成的列车数量,你可以为保存的列车设置'''生成限制'''。若要设置,首先使用指令<code>/train save <名称></code>将列车保存并将保存的名称写在生成器上,之后使用指令<code>/savedtrain <名称> spawnlimit <限制数量></code>来设置限制数量。这在自动化列车生成并应用在交通网络中很有用。
This can be combined with enabling <code>destroyAllOnShutdown</code> in '''config.yml''' so that on server restart everything starts with a clean slate.
| <span style="color:#FF0000">Red</span> || Spawned train has a spawn limit that is exceeded ([[TrainCarts/Lag#Saved_Train_Spawn_Limits|SavedTrain spawn limit]])
| <span style="color:#FFA500">Orange</span> || Maximum number of carts per world reached ([[TrainCarts/Lag#Limit_the_number_of_trains|config.yml maxCartsPerWorld setting]])
| <span style="color:#800000">Maroon</span> || Spawned train is too long ([[TrainCarts/Lag#Limit_the_number_of_trains|config.yml maxCartsPerTrain setting]])