TrainCarts/Signs/Property [ja]

From BergerHealer Wiki
Revision as of 03:26, 30 July 2026 by Saihou-Heiki (talk | contribs) (Created page with "=== チャンクローダー === 列車はプレイヤーのように周辺のチャンクをロードし続けることができます。プレイヤーが近くにおらずロードされていない場所へ走っていく時も、アンロードによって停止することなく進んでいくことが可能になります。この機能を利用するには、<code>keepchunksloaded</code>もしくは<code>keeploaded</code>プロパティを使います。''true''...")
Jump to navigation Jump to search
Other languages:

概要

プレイヤーはコマンドを用い、さまざまな列車のプロパティを変更できます。Propertyサインは、それと同じことを看板を用いて自動で行います。コマンドとPropertyサインの違いは、動作にレッドストーン信号を必要とすること、そして列車の所有権を無視して動作を行えることです。そのためもしあなたが所有しているトロッコだけを対象に取りたい場合は、別途Switcherサインで所有者を確認して振り分けるなどの必要があります。


記法

Signtemplate.png
[train]
property
speedlimit
1.5


二行目property

三行目変更したいプロパティ名

四行目プロパティに設定する値

真偽値ステートメント

『playerenterexit』プロパティがレバーで制御されています。

『playerenter』などや『slowdown』など、真偽値で表現されるプロパティはステートメントを利用して値を設定することができます。これを活用し、レッドストーンのオンオフや、他の列車のプロパティなどを参照してプロパティを設定することも簡単に行なえます。

遠隔操作

遠隔操作を使い、列車のプロパティを遠隔で設定できます。あなたの列車がtrain01という名前であれば、このような記法を利用できます。

Signtemplate.png
[train train01]
property
maxspeed
0.4


プロパティ

次のプロパティは[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 列車の最大速度制限を設定します。
pushing<ref name="collision">後方互換性のために残されている非推奨のプロパティです。現在はほにゃららcollision系のプロパティに置き換えられています。くわしくは衝突のページをご覧ください。</ref> false 列車がモブやプレイヤーなどを押し出すかどうか。
pushmobs<ref name="collision"/> true 列車がモブを押し出すかどうか。
pushplayers<ref name="collision"/> no 列車がプレイヤーを押し出すかどうか。
pushmisc<ref name="collision"/> 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 事前に名前付きで保存されたルートを呼び出します。


名前の設定

列車の名前と名前のプロパティは別物です。複数の列車の名前が変更される際、それぞれの列車は固有の名前を付ける必要があるため、シャープ記号の部分が連番の数字に置き換えられます。たとえばIntercity#Aという名前を設定するPropertyサインは、最初にそこを通った列車にIntercity1A、つぎの列車をIntercity2Aと命名します。この機能をSpawnサインと組み合わせて用いれば、特定の命名規則に沿って複数の列車を作れます。こうすると、カテゴリに属する列車を一気に遠隔操作する時に役に立ちます。


チャンクローダー

列車はプレイヤーのように周辺のチャンクをロードし続けることができます。プレイヤーが近くにおらずロードされていない場所へ走っていく時も、アンロードによって停止することなく進んでいくことが可能になります。この機能を利用するには、keepchunksloadedもしくはkeeploadedプロパティを使います。truefalseによる設定のほか、ロードの挙動や範囲によっていくつかのオプションがあります。

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

Signtemplate.png
[train]
property
keeploaded
true


/train keepchunksloaded minimal --radius 0

Signtemplate.png
[train]
property
keeploaded
minimal 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:

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.