//Property
概要
プレイヤーはコマンドを用い、さまざまな列車のプロパティを変更できます。Propertyサインは、それと同じことを看板を用いて自動で行います。コマンドとPropertyサインの違いは、動作にレッドストーン信号を必要とすること、そして列車の所有権を無視して動作を行えることです。そのためもしあなたが所有しているトロッコだけを対象に取りたい場合は、別途Switcherサインで所有者を確認して振り分けるなどの必要があります。
記法
二行目:property
三行目:変更したいプロパティ名
四行目:プロパティに設定する値
真偽値ステートメント
『playerenter』などや『slowdown』など、真偽値で表現されるプロパティはステートメントを利用して値を設定することができます。これを活用し、レッドストーンのオンオフや、他の列車のプロパティなどを参照してプロパティを設定することも簡単に行なえます。
遠隔操作
遠隔操作を使い、列車のプロパティを遠隔で設定できます。あなたの列車がtrain01という名前であれば、このような記法を利用できます。
プロパティ
次のプロパティは[cart]と[train]の両方で使用できます。
| プロパティ | 値の例 | 意味 |
|---|---|---|
| addtag |
tag1 |
タグをひとつ追加します。 |
| settag |
taga |
タグをひとつ設定します。 |
| remtag | a | タグをひとつ削除します。 |
| addticket | expresstrain | この列車で使用できる切符をひとつ追加します。 |
| setticket | expresstrain | その切符だけを受け付けるようにします。 |
| remticket | expresstrain | この列車でその切符を使用できないようにします。 |
| addowner |
Maxxue |
列車の所有者を追加します。 |
| setowner |
Maxxue |
既に設定されている所有者をすべて取り消し、新しいオーナーを設定し直します。 |
| remowner | Maxxue | 列車の所有者から外します。 |
| destination | station2 | 列車の目的地を設定します。 |
| mobenter | false | モブが乗り込めるかどうかを設定します。 |
| playerenter | true | プレイヤーが乗り込めるかどうかを設定します。 |
| playerexit | yes | プレイヤーが下車できるかどうか。 |
| playerenterexit playerexitenter |
yes | playerenterプロパティとplayerexitプロパティを一括で同じ値に設定できます。 |
| spawnitemdrops spawndrops killdrops |
true | トロッコが破壊された時にアイテムとしてドロップするかどうか。 無効に設定した場合、チェスト付きトロッコおよびホッパー付きトロッコのアイテムドロップも無効になります。 |
| viewdistance | 10 | Paperサーバー限定です! 列車やトロッコの乗客のチャンクおよびエンティティの描画距離を変更します。列車が巨大な市街地などを通る際などに、負荷を削減するのに使えます。 |
次のプロパティは[train]専用です。
| プロパティ | 値の例 | 意味 |
|---|---|---|
| name setname rename |
Intercity#A | 列車の名前を設定します。シャープ記号(#)は、ナンバー1から順々に割り振られる数字に置き換えられます。 |
| dname setdname displayname setdisplayname |
Trainname | Triggerサイン(%triggernameN%)で利用される表示名を設定します。 |
| exitoffset exitlocation exityaw exitpitch exitrotation |
2/0/0 200/45/-2333 30 0 90 |
プレイヤーが下車した際のヨー、ピッチ、回転のオフセットを指定します。exitlocationは絶対位置を指定します。逆にexitoffsetはトロッコからの相対位置を指定します。 |
| speedlimit maxspeed |
0.6 | 列車の最大速度制限を設定します。 |
| false | 列車がモブやプレイヤーなどを押し出すかどうか。 | |
| true | 列車がモブを押し出すかどうか。 | |
| no | 列車がプレイヤーを押し出すかどうか。 | |
| yes | 列車がアイテムやボートなどを押し出すかどうか。 | |
| playercollision mobcollision traincollision misccollision |
default cancel kill killnodrops push enter link |
それぞれプレイヤーやモブ、列車やその他に対する衝突のモードを設定します。 |
| slowdown | false | 列車が重力や摩擦で減速するかどうかを変更します。 |
| slowfriction | false | 列車が摩擦により減速するかどうか。 |
| slowgravity | false | 列車が重力によって加減速するかどうか。 |
| gravity | 1.0 | 重力による加速や減速の倍率を設定します。デフォルトでは1.0で、計算はかけ算です。 |
| linking | deny | 列車が他の列車とくっつくかどうか。 |
| collision | allow | 列車が他のエンティティとぶつかるかどうか。 |
| keepcloaded loadchunks keeploaded |
true | 列車が付近のチャンクをロードしたままにするかどうか。 |
| default setdefault |
stat1def | DefaultTrainProperties.ymlで設定されているデフォルト設定を列車に適用します。 |
| banking | 1 0 | 列車の傾きに関するプロパティを設定します。ひとつめの数字は強度、ふたつ目の数字は滑らかさです。 |
| godmode
invincible |
true | 列車を無敵にします。train.break.any(デフォルトではOP)を持つプレイヤーにしか破壊できません。 |
| waitdistance waitdelay waitacceleration waitpredicted |
See the Wait Property section | |
| route add route set route remove route clear |
destination_name | 列車のルートを追加したり、設定したり、削除したり、クリアしたりします。最後に目的地も追加されます。 |
| route load loadroute |
my_saved_route | 事前に名前付きで保存されたルートを呼び出します。 |
Set name
The name property alters the name of the train. To account for multiple trains being renamed, and because every train needs a unique name, the # value is added as a counter-based replacement. For example, the first train passing over the property sign with name value: Intercity#A would be named Intercity1A and the second Intercity2A, and so on. You can use this in combination with the spawner sign to spawn trains with a fixed naming system. This naming system can then be used for remote control to control all trains of a certain spawner or category.
Keep Chunks Loaded
Trains can keep chunks around them loaded like players do. This allows them to move through the world without unloading when there are no players nearby. This feature can be enabled per train using the keepchunksloaded or keeploaded property. This can be set with a legacy true/false value, or a load mode and radius.
On modern versions of Minecraft a chunk load type is also active, which can be full, redstone or minimal. Full will tick entities in the chunks loaded, redstone will not tick entities but will simulate redstone physics, and minimal will not run either. To improve server performance it can help to switch the mode to minimal with a lower radius when the train is driving long distances that don't require world simulation.
| Value | Description |
|---|---|
| false | Disables the chunk loader. The train will now unload if no player is nearby. |
| true | Enables the chunk loader with a radius of 5x5 full entity-ticked chunks. In effect this loads a 9x9 area of chunks. Equivalent to full 2
|
| minimal 0 | Enables the chunk loader, but only loads the chunks the train is inside of. Does not simulate entities or redstone (except for the train itself). This has the most performance and is suitable for long-distance travel. |
| redstone 2 | Enables the chunk loader, loading and simulating a 5x5 block-ticked (redstone simulated) chunks, and an outer 7x7 layer of non-simulated chunks. Useful at stations when redstone has to be simulated, but entities at these stations don't need to be ticked. |
| full 10 | Enables the chunk loader, loading a 21x21 area of chunks and simulating entities inside. A 23x23 layer around it is block-ticked, and another 25x25 layer around that is not simulated. So this is actually loading 25x25 chunks. If you're looking for a chunk loader that acts like a Player, this is it. |
Examples
/train keepchunksloaded true
/train keepchunksloaded minimal --radius 0
Wait Property
The wait properties control when a train will automatically slow down. This can be used to slow a train down when obstacles are ahead of the train. This feature largely replaces the older waiter sign, and is a lot more intelligent:
- Maintain distance with other trains up ahead
- Slow down approaching occupied mutex zones
- Slow down approaching a blocker sign that will block the train
The following 'wait' properties exist:
| Property | Example Value | Description |
|---|---|---|
| waitdistance | 20.5 | Distance to keep between this train and the train ahead, in blocks. The train will slow down or stop completely maintaining distance. |
| waitacceleration | 20kmh/s | The rate of acceleration at which trains slow down or speed up when obstacles ahead appear or disappear. When specifying two numbers, the first number is the rate speeding up, the second number the rate slowing down. This can be set without the waitdistance, and will be used to slow down when approaching blockers or mutexes. |
| waitdelay | 30 | When the train is completely stopped due an obstacle, waits at least this delay in seconds until starting to move again |
| waitpredicted | false | Controls whether the path the train will take is predicted. By default on. When enabled, this will take into account switcher signs and where the train will be routed to when checking for obstacles. |
They can also be configured with the /train wait <property> <value> set of commands.
