Difference between revisions of "TrainCarts/Spawning/zh-cn"

From BergerHealer Wiki
Jump to navigation Jump to search
(Created page with "例如,你想生成一辆列车,后面跟着For example, if you want to spawn a locomotive followed by red-green-blue carriages repeated four times (12 carriages), you can...")
 
(10 intermediate revisions by the same user not shown)
Line 103: Line 103:
  
  
<div lang="en" dir="ltr" class="mw-content-ltr">
+
=== 保存列车的生成模式 ===
=== Saved Spawn Patterns ===
 
</div>
 
  
<div lang="en" dir="ltr" class="mw-content-ltr">
+
可以使用<code>/savedtrain [名称] spawn [模式]</code>保存(长)列车生成模式,而不是只保存列车。
Instead of saving a train, a (long) train spawning pattern can be saved instead with <code>/savedtrain [name] spawn [pattern]</code>.
 
</div>
 
  
<div lang="en" dir="ltr" class="mw-content-ltr">
+
例如:
For example:
 
 
<pre>
 
<pre>
 
/savedtrain MyTrain spawn 4[50%m 50%s] p
 
/savedtrain MyTrain spawn 4[50%m 50%s] p
 
</pre>
 
</pre>
</div>
 
  
<div lang="en" dir="ltr" class="mw-content-ltr">
+
生成 ''MyTrain'' 时,将随机生成 4 辆普通矿车或运输矿车,然后是 1 辆动力矿车。当模式太长无法输入进生成牌时尤其有用。这些模式可以递归使用。
When spawning ''MyTrain'' this will spawn 4 random rideable Minecarts or Minecart with chest, followed by a single Minecart with Furnace. This is especially useful when patterns are too long to fit on spawn signs. These patterns can be used recursively.
 
</div>
 
  
  
<div lang="en" dir="ltr" class="mw-content-ltr">
+
=== 重复 ===
=== Repetition ===
 
</div>
 
  
<div lang="en" dir="ltr" class="mw-content-ltr">
+
多个列车名称或原版矿车名称可以彼此紧随放置,无需空格。匹配名称时,将匹配与模式符合的最长的保存列车名称。
Multiple train names or Vanilla Minecart names can be put following each other, no space required. When matching the names, it matches the longest saved train name that matches the pattern.
 
</div>
 
  
  
<div lang="en" dir="ltr" class="mw-content-ltr">
+
=== 数量前缀 ===
=== Amount Prefix ===
 
</div>
 
  
<div lang="en" dir="ltr" class="mw-content-ltr">
+
可以在名称前输入数值来重复生成模式。如果你想生成 ''MyTrain'' 三次,可以输入<code>3MyTrain</code>
Digits can be put in front of names to repeat that pattern a number of times. If you want to spawn ''MyTrain'' three times, you can put <code>3MyTrain</code>
 
</div>
 
  
  
<div lang="en" dir="ltr" class="mw-content-ltr">
+
=== 分组序列 ===
=== Grouped Sequences ===
 
</div>
 
  
<div lang="en" dir="ltr" class="mw-content-ltr">
+
可以对生成模式进行分组,以便数量前缀重复整个组,而不是仅重复某一辆列车或矿车。
Patterns can be grouped so that the amount prefix repeats the entire group, instead of only the one train or cart specified.
 
</div>
 
  
<div lang="en" dir="ltr" class="mw-content-ltr">
+
例如,你想生成一辆列车,后面跟着For example, if you want to spawn a locomotive followed by red-green-blue carriages repeated four times (12 carriages), you can put:
For example, if you want to spawn a locomotive followed by red-green-blue carriages repeated four times (12 carriages), you can put:
 
 
<pre>
 
<pre>
 
4[carr carg carb] loco
 
4[carr carg carb] loco
 
</pre>
 
</pre>
</div>
 
  
  

Latest revision as of 07:29, 29 September 2024

Other languages:
English • ‎Nederlands • ‎中文(中国大陆)‎

« 返回

介绍

TC 提供了多种不同的生成列车方式,以下:

  • 原版矿车 - 玩家可以生成 TC 矿车。这个页面展示了原版矿车的行为。
  • 生成牌 - 在生成牌上方的轨道上生成列车,可以通过红石启用,也可以实现周期、间隔自动化生成。
  • 列车生成箱 - 一个便携物品,可以将列车储存进去并在轨道上重新放置。


生成模式

列车生成箱和生成牌都支持生成模式语法。使用语法可以将多个矿车或多辆不同的以保存的列车组合起来并生成。

机制 模式 释义
原版矿车 m 生成一个可乘坐的矿车。
保存列车 MyTrain 生成 1 个名为 MyTrain 的列车。
Repetition mmm 生成 3 个可乘坐的矿车。
数量前缀 3m3s 生成 3 个可乘坐的矿车和 3 个运输矿车(总共 6 个矿车)。
分组序列 3[ms] 生成 3 组且每组由 1 个矿车和 1 个运输矿车组成,与msmsms等价。
随机 3[33%RedCart 33%GreenCart 33%BlueCart] 生成 3 组且每组由 3 种保存的列车并根据设置的随机率组成。


原版矿车

默认原版矿车通过指定的单个字符表示:

文本 矿车类型
m 普通矿车
p 动力矿车
s 运输矿车
t TNT 矿车
h 漏斗矿车
e 刷怪笼矿车


例如,这个生成牌会生成 3 个矿车组成的列车:

Signtemplate.png
[train]
spawn
mmm

这个命令会给予玩家一个能生成 3 个矿车组成的列车的列车生成箱

/train chest mmm


已保存的列车

玩家可以使用/train save [名称]保存正在编辑的列车。这个名称可以在生成模式中使用。

  • 匹配保存的列车名称时,将匹配最长的名称。
  • 可以使用命令列出保存的列车名称:/savedtrain list
  • 可以使用命令导入或编辑保存的列车:/savedtrain [名称] [子命令]
  • 保存的列车也可以包含进服务器加载的资源包中,就像 TrainCarts Demo Resource Pack 一样。
  • 注意:保存的列车名称与命名(/train rename)的列车不同。两者之间没有关系。


例如,这个生成牌会生成一辆名为 MyTrain 的列车:

Signtemplate.png
[train]
spawn
MyTrain

该命令会给予玩家一个列车生成箱,且内含列车的名称为“MyTrain”:

/train chest MyTrain


保存列车的生成模式

可以使用/savedtrain [名称] spawn [模式]保存(长)列车生成模式,而不是只保存列车。

例如:

/savedtrain MyTrain spawn 4[50%m 50%s] p

生成 MyTrain 时,将随机生成 4 辆普通矿车或运输矿车,然后是 1 辆动力矿车。当模式太长无法输入进生成牌时尤其有用。这些模式可以递归使用。


重复

多个列车名称或原版矿车名称可以彼此紧随放置,无需空格。匹配名称时,将匹配与模式符合的最长的保存列车名称。


数量前缀

可以在名称前输入数值来重复生成模式。如果你想生成 MyTrain 三次,可以输入3MyTrain


分组序列

可以对生成模式进行分组,以便数量前缀重复整个组,而不是仅重复某一辆列车或矿车。

例如,你想生成一辆列车,后面跟着For example, if you want to spawn a locomotive followed by red-green-blue carriages repeated four times (12 carriages), you can put:

4[carr carg carb] loco


Random

Use the % weighted prefix to randomly have a pattern choose between different types of trains to spawn. This follows a syntax similar to the WorldEdit syntax.

For example, to spawn a locomotive followed by 12 carts of random red, green or blue carriages:

12[33%carr 33%carg 33%carb] loco

These prefixes can also be applied to grouped sequences to create variable-length trains. This will spawn a locomotive with randomly 0, 1 or 2 carriages:

[33%[] 33%carb 33%[carr carg]] loco

The percentage total is normalized, so in the above examples using 50% or 200% would have resulted in the same behavior.