TrainCarts/Signs/Property [ja]

From BergerHealer Wiki
Jump to navigation Jump to search
(Created page with "次のプロパティは'''[cart]と[train]の両方で使用できます'''。")
(Created page with "{| class="wikitable" |- ! プロパティ ! 値の例 ! 意味 |- | addtag<br> | tag1<br> | タグをひとつ追加します。<br> |- | settag<br> | taga<br> | タグをひとつ設定します。<br> |- | remtag | a | タグをひとつ削除します。 |- | addticket | expresstrain | この列車で使用できる切符をひとつ追加します。 |- | setticket | expresstrain | その切符だけを受け付けるようにします。 |- | remticket | expresstr...")
Line 31: Line 31:
次のプロパティは'''[cart]と[train]の両方で使用できます'''。
次のプロパティは'''[cart]と[train]の両方で使用できます'''。


<div lang="en" dir="ltr" class="mw-content-ltr">
{| class="wikitable"
{| class="wikitable"
|-
|-
! Property
! プロパティ
! Value example
! 値の例
! Meaning
! 意味
|-
|-
| addtag<br>
| addtag<br>
| tag1<br>
| tag1<br>
| Add a single tag<br>
| タグをひとつ追加します。<br>
|-
|-
| settag<br>
| settag<br>
| taga<br>
| taga<br>
| Set to a single tag<br>
| タグをひとつ設定します。<br>
|-
|-
| remtag
| remtag
| a
| a
| Remove a single tag
| タグをひとつ削除します。
|-
|-
| addticket
| addticket
| expresstrain
| expresstrain
| Add a ticket that can be used for this train
| この列車で使用できる切符をひとつ追加します。
|-
|-
| setticket
| setticket
| expresstrain
| expresstrain
| Set the train to only accept this ticket
| その切符だけを受け付けるようにします。
|-
|-
| remticket
| remticket
| expresstrain
| expresstrain
| Remove a ticket so it can no longer be used for this train
| この列車でその切符を使用できないようにします。
|-
|-
| addowner<br>
| addowner<br>
| Maxxue<br>
| Maxxue<br>
| Add an owner to the train<br>
| 列車の所有者を追加します。<br>
|-
|-
| setowner<br>
| setowner<br>
| Maxxue<br>
| Maxxue<br>
| Clear all owners and set to this owner
| 既に設定されている所有者をすべて取り消し、新しいオーナーを設定し直します。
|-
|-
| remowner
| remowner
| Maxxue
| Maxxue
| Remove a single owner from the train
| 列車の所有者から外します。
|-
|-
| destination
| destination
| station2
| station2
| Set the destination
| 列車の目的地を設定します。
|-
|-
| mobenter
| mobenter
| false
| false
| Set if mobs can enter
| モブが乗り込めるかどうかを設定します。
|-
|-
| playerenter
| playerenter
| true
| true
| Set if players can enter
| プレイヤーが乗り込めるかどうかを設定します。
|-
|-
| playerexit
| playerexit
| yes
| yes
| Set if players can exit
| プレイヤーが下車できるかどうか。
|-
|-
| playerenterexit<br>playerexitenter
| playerenterexit<br>playerexitenter
| yes
| yes
| Sets both playerenter and playerexit at the same time to the same value.
| playerenterプロパティとplayerexitプロパティを一括で同じ値に設定できます。
|-
|-
| spawnitemdrops<br>spawndrops<br>killdrops
| spawnitemdrops<br>spawndrops<br>killdrops
| true
| true
| Sets whether carts drop items when destroyed.<br>When disabled, also disables contents of chest/hopper minecarts dropping.
| トロッコが破壊された時にアイテムとしてドロップするかどうか。<br>無効に設定した場合、チェスト付きトロッコおよびホッパー付きトロッコのアイテムドロップも無効になります。
|-
|-
| viewdistance
| viewdistance
| 10
| 10
| (Paper servers only!) Sets it so that passengers of the cart/train have a certain chunk/entity view distance. Can be used to reduce lag in busy areas of the world.
| '''Paperサーバー限定です!''' 列車やトロッコの乗客のチャンクおよびエンティティの描画距離を変更します。列車が巨大な市街地などを通る際などに、負荷を削減するのに使えます。
|}
|}
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
次のプロパティは'''[train]専用です'''
The following properties can only be set using '''[train]''':
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">

Revision as of 00:09, 30 July 2026

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]専用です

Property Value example Meaning
name
setname
rename
Intercity#A Sets a new name on the train. The #-sign is replaced with a number 1 to infinity.
dname
setdname
displayname
setdisplayname
Trainname Sets the display name used with trigger signs (%triggernameN%)
exitoffset
exitlocation
exityaw
exitpitch
exitrotation
2/0/0
200/45/-2333
30
0
90
Change player exit offset, yaw, pitch and rotation. Exit location uses absolute coordinates, exit offset relative to the cart(s).
speedlimit
maxspeed
0.6 The maximum allowed speed the train can go
pushing<ref name="collision">Old syntax for compatibility. Replaced by typecollision. See Collision modes</ref> false Set if the train pushes mobs, players, trains and misc
pushmobs<ref name="collision"/> true Set if the train pushes mobs
pushplayers<ref name="collision"/> no Set if the train pushes players
pushmisc<ref name="collision"/> yes Set if the train pushes misc (items, boats, etc.)
playercollision
mobcollision
traincollision
misccollision
default
cancel
kill
killnodrops
push
enter
link
Set a collision mode for the train against players, mobs, trains or other types of entities.
slowdown false Set if the train slows down, either by gravity or by friction
slowfriction false Set if the train slows down due to friction
slowgravity false Set if the train slows down, or speeds up, due to gravity
gravity 1.0 Changes the acceleration and deceleration due to gravity (multiplier, 1.0 is default)
linking deny Set if the train can link with other trains
collision allow Set if the train can collide with other entities
keepcloaded
loadchunks
keeploaded
true Set if the train keeps nearby chunks loaded
default
setdefault
stat1def Load one of the default train properties found in
DefaultTrainProperties.yml into this train
banking 1 0 Change the banking (First number: Strength, Second number: Smoothness)
godmode

invincible

true Makes a train invincible, so that players cannot destroy it by hitting it.

Players with the train.break.any permission (default: OP) can break trains anyway.

waitdistance
waitdelay
waitacceleration
waitpredicted
See the Wait Property section
route add
route set
route remove
route clear
destination_name Adds/removes/clears/sets the destinations of the route set for a train. Destinations are added at the end.
route load
loadroute
my_saved_route Loads a previously saved route by name.


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

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.