TrainCarts/控制牌/生成器
介绍
列车生成器会生成完整的列车。列车会在控制牌上方铁轨的文本一侧生成。当激活生成牌时(之前处于未激活状态),生成牌会检测铁轨上是否有其他列车,如果轨道无占用,就会生成一辆列车。
语法
第一行
[train],可以指定列车的生成方向。例如:[train:left] 或 [train:right]。如果没有指定,则会根据红石信号的输入方向来作为生成方向。关于自动生成器,建议使用 [+train] 来让生成器始终运作。
第二行
spawn,后可添加前进动力来生成列车。
第三行和第四行
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.
Text | Minecart type |
---|---|
m | Regular Minecart |
p | Powered Minecart |
s | Storage Minecart |
t | TNT Minecart |
h | Hopper minecart |
e | Minecart with Spawner |
It is also possible to spawn trains you made and saved before. Just put the name of the train on the 3rd line instead of the minecart types.
Automated spawning
It is possible to spawn trains at a set interval:
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.
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 (/train save name
). Then, use the /savedtrain name spawnlimit <limit>
command to set a limit. This is useful when automatically populating a train network with trains.
This can be combined with enabling destroyAllOnShutdown
in config.yml so that on server restart everything starts with a clean slate.
Failure Colors
When the spawn sign fails to spawn, it shows dust particles at the sign to explain why.
Color | Reason |
---|---|
Blue | Not enough rails to spawn on |
Purple | Rails are occupied by another train |
Red | Spawned train has a spawn limit that is exceeded (SavedTrain spawn limit) |
Orange | Maximum number of carts per world reached (config.yml maxCartsPerWorld setting) |
Maroon | Spawned train is too long (config.yml maxCartsPerTrain setting) |
Yellow | Spawn sign cooldown prevents spawning (config.yml spawnSignCooldown setting) |