/Spawning
Saihou-Heiki (talk | contribs) (Created page with "== スポーンパターン ==") |
Saihou-Heiki (talk | contribs) (Created page with "トレインチェストやSpawnサインは、スポーンパターンの構文をサポートしています。この構文を用いれば、複数の異なるトロッコや保存済みの列車を記述でき、それらをまとめてスポーンできます。") |
||
| Line 10: | Line 10: | ||
== スポーンパターン == | == スポーンパターン == | ||
トレインチェストやSpawnサインは、スポーンパターンの構文をサポートしています。この構文を用いれば、複数の異なるトロッコや保存済みの列車を記述でき、それらをまとめてスポーンできます。 | |||
<div lang="en" dir="ltr" class="mw-content-ltr"> | <div lang="en" dir="ltr" class="mw-content-ltr"> | ||
Revision as of 01:44, 25 August 2026
概要
TrainCartsでは、複数の方法で列車をスポーンさせることができます。
- 通常のトロッコ:プレイヤーは通常、TrainCarts仕様のトロッコをスポーンさせます。このページでは、バニラ仕様のトロッコをスポーンさせる方法を解説しています。
- Spawnサイン:レール上に、レッドストーン信号の入力に反応して、もしくは時間を指定した周期的なスポーンを行います。
- トレインチェスト:プレイヤーが列車を収納、スポーンできる持ち運び可能なアイテムです。
スポーンパターン
トレインチェストやSpawnサインは、スポーンパターンの構文をサポートしています。この構文を用いれば、複数の異なるトロッコや保存済みの列車を記述でき、それらをまとめてスポーンできます。
| Mechanism | Pattern | Explanation |
|---|---|---|
| Vanilla Minecarts | m
|
Spawns a rideable Minecart |
| Saved Trains | MyTrain
|
Spawns the train saved as MyTrain |
| Repetition | mmm
|
Spawns three rideable Minecarts |
| Amount Prefix | 3m3s
|
Spawns three rideable Minecarts and three Minecarts with Chest as a 6-cart train |
| Grouped Sequences | 3[ms]
|
Spawns 3 pairs of a rideable Minecart and Minecart with Chest. Same as msmsms
|
| Random | 3[33%RedCart 33%GreenCart 33%BlueCart]
|
Spawns a 3-cart train with random color carts that were previous saved |
Vanilla Minecarts
Default Vanilla Minecarts can be specified with the single-character names below:
| Text | Minecart type |
|---|---|
| m | Regular Minecart |
| p | Powered Minecart |
| s | Storage Minecart |
| t | TNT Minecart |
| h | Hopper minecart |
| e | Minecart with Spawner |
For example, this spawn sign spawns a 3-minecart train:
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:
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.
