TrainCarts/Spawning/zh: Difference between revisions

From BergerHealer Wiki
Jump to navigation Jump to search
(Created page with "TC 提供了多种不同的生成列车方式,以下: * '''原版矿车''' - 玩家可以生成 TC 矿车。这个页面展示了原版矿车的行为。 * '''生成牌''' - 在生成牌上方的轨道上生成列车,可以通过红石启用,也可以实现周期、间隔自动化生成。 * '''列车生成箱''' -...")
(Created page with "{| class="wikitable" |- ! 机制 ! 模式 ! 释义 |- | 原版矿车 | <code>m</code> | 生成一个可乘坐的矿车。 |- | 保存列车 | <code>MyTrain</code> | 生成 1 个名为 ''MyTrain'' 的列车。 |- | Repetition | <code>mmm</code> | 生成 3 个可乘坐的矿车。 |- | 数量前缀 | <code>3m3s</code> | 生成 3 个可乘坐的矿车和 3 个运输矿车(总共 6 个矿车)。 |- | 分组序列 | <code>3[ms]</code> | 生成 3 组且每组由 1 个矿...")
Line 10: Line 10:




<div lang="en" dir="ltr" class="mw-content-ltr">
== 生成模式 ==
== Spawn Pattern ==
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
列车生成箱和生成牌都支持生成模式语法。使用语法可以将多个矿车或多辆不同的以保存的列车组合起来并生成。
Both the train spawn chest and the spawn sign support a spawn pattern syntax. With this syntax a train can be composed of multiple different carts or saved trains, and then spawned as a whole.
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
{| class="wikitable"
{| class="wikitable"
|-
|-
! Mechanism
! 机制
! Pattern
! 模式
! Explanation
! 释义
|-
|-
| Vanilla Minecarts
| 原版矿车
| <code>m</code>
| <code>m</code>
| Spawns a rideable Minecart
| 生成一个可乘坐的矿车。
|-
|-
| Saved Trains
| 保存列车
| <code>MyTrain</code>
| <code>MyTrain</code>
| Spawns the train saved as ''MyTrain''
| 生成 1 个名为 ''MyTrain'' 的列车。
|-
|-
| Repetition
| Repetition
| <code>mmm</code>
| <code>mmm</code>
| Spawns three rideable Minecarts
| 生成 3 个可乘坐的矿车。
|-
|-
| Amount Prefix
| 数量前缀
| <code>3m3s</code>
| <code>3m3s</code>
| Spawns three rideable Minecarts and three Minecarts with Chest as a 6-cart train
| 生成 3 个可乘坐的矿车和 3 个运输矿车(总共 6 个矿车)。
|-
|-
| Grouped Sequences
| 分组序列
| <code>3[ms]</code>
| <code>3[ms]</code>
| Spawns 3 pairs of a rideable Minecart and Minecart with Chest. Same as <code>msmsms</code>
| 生成 3 组且每组由 1 个矿车和 1 个运输矿车组成,与<code>msmsms</code>等价。
|-
|-
| Random
| 随机
| <code>3[33%RedCart 33%GreenCart 33%BlueCart]</code>
| <code>3[33%RedCart 33%GreenCart 33%BlueCart]</code>
| Spawns a 3-cart train with random color carts that were previous saved
| 生成 3 组且每组由 3 种保存的列车并根据设置的随机率组成。
|}
|}
</div>




<div lang="en" dir="ltr" class="mw-content-ltr">
=== 原版矿车 ===
=== Vanilla Minecarts ===
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
默认原版矿车通过指定的单个字符表示:
Default Vanilla Minecarts can be specified with the single-character names below:
{| class="wikitable"
{| class="wikitable"
|-
|-
! Text
! 文本
! Minecart type
! 矿车类型
|-
|-
| m
| m
| [https://minecraft.wiki/w/Minecart Regular Minecart]
| [https://minecraft.wiki/w/Minecart 普通矿车]
|-
|-
| p
| p
| [https://minecraft.wiki/w/Minecart_with_Furnace Powered Minecart]
| [https://minecraft.wiki/w/Minecart_with_Furnace 动力矿车]
|-
|-
| s
| s
| [https://minecraft.wiki/w/Minecart_with_Chest Storage Minecart]
| [https://minecraft.wiki/w/Minecart_with_Chest 运输矿车]
|-
|-
| t
| t
| [https://minecraft.wiki/w/Minecart_with_TNT TNT Minecart]
| [https://minecraft.wiki/w/Minecart_with_TNT TNT 矿车]
|-
|-
| h
| h
| [https://minecraft.wiki/w/Minecart_with_Hopper Hopper minecart]
| [https://minecraft.wiki/w/Minecart_with_Hopper 漏斗矿车]
|-
|-
| e
| e
| [https://minecraft.wiki/w/Minecart_with_Monster_Spawner Minecart with Spawner]
| [https://minecraft.wiki/w/Minecart_with_Monster_Spawner 刷怪笼矿车]
|}
|}
</div>





Revision as of 08:43, 10 October 2025

« 返回

介绍

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 刷怪笼矿车


For example, this spawn sign spawns a 3-minecart train:

Signtemplate.png
[train]
spawn
mmm


And this command gives the player a train spawn chest that spawns a 3-minecart train:

/train chest mmm


Saved Trains

Players can use /train save [name] to save the train they are editing as a saved train. This name can then be used in a spawn pattern.

  • When matching a saved train name, the longest name that matches is selected
  • Saved train names can be listed with command: /savedtrain list
  • Saved trains can be imported or edited with command: /savedtrain [name] [subcommand]
  • Saved trains can also be included in a resource pack loaded on the server, like what the TrainCarts Demo Resource Pack
  • Note: Saved train names are not the same as named trains (/train rename). There is no relation between the two.


For example, this spawn sign spawns a train named MyTrain:

Signtemplate.png
[train]
spawn
MyTrain


And this command gives the player a train spawn chest that spawns a train named MyTrain:

/train chest MyTrain


Saved Spawn Patterns

Instead of saving a train, a (long) train spawning pattern can be saved instead with /savedtrain [name] spawn [pattern].

For example:

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

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.


Repetition

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.


Amount Prefix

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 3MyTrain


Grouped Sequences

Patterns can be grouped so that the amount prefix repeats the entire group, instead of only the one train or cart specified.

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.