Difference between revisions of "TrainCarts/Signs/Property"
Bergerkiller (talk | contribs) |
Bergerkiller (talk | contribs) (Marked this version for translation) |
||
(9 intermediate revisions by 2 users not shown) | |||
Line 29: | Line 29: | ||
=== Boolean Statements === <!--T:17--> | === Boolean Statements === <!--T:17--> | ||
[[File:Tc_property_statement.png|thumb|300px|Property 'playerenterexit' is controlled using the lever]] | [[File:Tc_property_statement.png|thumb|300px|Property 'playerenterexit' is controlled using the lever]] | ||
− | Boolean properties like playerenter and slowdown can be set using a [[TrainCarts/Signs/Statements|statement]] to evaluate true/false. This makes it much easier to toggle something on or off with redstone, or based on another property of the train. | + | Boolean properties like playerenter and slowdown can be set using a [[Special:MyLanguage/TrainCarts/Signs/Statements|statement]] to evaluate true/false. This makes it much easier to toggle something on or off with redstone, or based on another property of the train. |
=== Remote Control === <!--T:8--> | === Remote Control === <!--T:8--> | ||
Line 65: | Line 65: | ||
| a | | a | ||
| Remove a single tag | | Remove a single tag | ||
+ | |- | ||
+ | | addticket | ||
+ | | expresstrain | ||
+ | | Add a ticket that can be used for this train | ||
+ | |- | ||
+ | | setticket | ||
+ | | expresstrain | ||
+ | | Set the train to only accept this ticket | ||
+ | |- | ||
+ | | remticket | ||
+ | | expresstrain | ||
+ | | Remove a ticket so it can no longer be used for this train | ||
|- | |- | ||
| addowner<br> | | addowner<br> | ||
Line 101: | Line 113: | ||
| true | | true | ||
| Sets whether carts drop items when destroyed.<br>When disabled, also disables contents of chest/hopper minecarts dropping. | | Sets whether carts drop items when destroyed.<br>When disabled, also disables contents of chest/hopper minecarts dropping. | ||
+ | |- | ||
+ | | viewdistance | ||
+ | | 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. | ||
|} | |} | ||
Line 197: | Line 213: | ||
| route add<br>route set<br>route remove<br>route clear | | route add<br>route set<br>route remove<br>route clear | ||
| destination_name | | destination_name | ||
− | | Adds/removes/clears/sets the destinations of the [[TrainCarts/PathFinding#Route_Manager|route]] set for a train. Destinations are added at the end. | + | | Adds/removes/clears/sets the destinations of the [[Special:MyLanguage/TrainCarts/PathFinding#Route_Manager|route]] set for a train. Destinations are added at the end. |
|- | |- | ||
| route load<br>loadroute | | route load<br>loadroute | ||
| my_saved_route | | my_saved_route | ||
− | | Loads a previously saved [[TrainCarts/PathFinding#Route_Manager|route]] by name. | + | | Loads a previously saved [[Special:MyLanguage/TrainCarts/PathFinding#Route_Manager|route]] by name. |
|} | |} | ||
+ | |||
=== Set name === <!--T:15--> | === Set name === <!--T:15--> | ||
Line 208: | Line 225: | ||
<!--T:16--> | <!--T:16--> | ||
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. | 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 === <!--T:21--> | ||
+ | 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 <code>keepchunksloaded</code> or <code>keeploaded</code> property. This can be set with a legacy ''true/false'' value, or a load mode and radius. | ||
+ | |||
+ | <!--T:22--> | ||
+ | On modern versions of Minecraft a [https://minecraft.wiki/w/Chunk#Level_and_load_type chunk load type] is also active, which can be <code>full</code>, <code>redstone</code> or <code>minimal</code>. 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 [[TrainCarts/Lag|improve server performance]] it can help to switch the mode to <code>minimal</code> with a lower radius when the train is driving long distances that don't require world simulation. | ||
+ | |||
+ | <!--T:23--> | ||
+ | {| class="wikitable" | ||
+ | |- | ||
+ | ! 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 <code>full 2</code> | ||
+ | |- | ||
+ | | 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 ==== <!--T:24--> | ||
+ | <code>/train keepchunksloaded true</code> | ||
</translate> | </translate> | ||
+ | {{sign|[train]|property|keeploaded|true}} | ||
+ | |||
+ | |||
+ | <code>/train keepchunksloaded minimal --radius 0</code> | ||
+ | {{sign|[train]|property|keeploaded|minimal 0}} | ||
+ | <translate> | ||
− | === Wait Property === | + | |
+ | === Wait Property === <!--T:18--> | ||
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 [[Special:MyLanguage/TrainCarts/Signs/Waiter|waiter sign]], and is a lot more intelligent: | 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 [[Special:MyLanguage/TrainCarts/Signs/Waiter|waiter sign]], and is a lot more intelligent: | ||
* Maintain distance with other trains up ahead | * Maintain distance with other trains up ahead | ||
− | * Slow down approaching [[TrainCarts/Signs/Mutex|occupied mutex zones]] | + | * Slow down approaching [[Special:MyLanguage/TrainCarts/Signs/Mutex|occupied mutex zones]] |
− | * Slow down approaching a [[TrainCarts/Signs/Blocker|blocker sign]] that will block the train | + | * Slow down approaching a [[Special:MyLanguage/TrainCarts/Signs/Blocker|blocker sign]] that will block the train |
+ | <!--T:19--> | ||
The following 'wait' properties exist: | The following 'wait' properties exist: | ||
{| class="wikitable" | {| class="wikitable" | ||
Line 229: | Line 286: | ||
| waitacceleration | | waitacceleration | ||
| 20kmh/s | | 20kmh/s | ||
− | | The [[TrainCarts/Acceleration|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. | + | | The [[Special:MyLanguage/TrainCarts/Acceleration|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 | | waitdelay | ||
Line 237: | Line 294: | ||
| waitpredicted | | waitpredicted | ||
| false | | false | ||
− | | Controls whether the path the train will take is predicted. By default on. When enabled, this will take into account [[TrainCarts/Signs/Switcher|switcher signs]] and where the train will be routed to when checking for obstacles. | + | | Controls whether the path the train will take is predicted. By default on. When enabled, this will take into account [[Special:MyLanguage/TrainCarts/Signs/Switcher|switcher signs]] and where the train will be routed to when checking for obstacles. |
|} | |} | ||
+ | <!--T:20--> | ||
They can also be configured with the <code>/train wait <property> <value></code> set of commands. | They can also be configured with the <code>/train wait <property> <value></code> set of commands. | ||
+ | </translate> |
Latest revision as of 13:18, 19 January 2025
Introduction
Property signs can perform the same tasks as you can do through commands, but then automated. They require redstone power to function and ignore cart ownership, so if you only want it to target trains you own, combine it with a switcher sign checking for owners.
Syntax
Second line: property
Third line: the property name to change
Fourth line: the value to set the property to
Boolean Statements
Boolean properties like playerenter and slowdown can be set using a statement to evaluate true/false. This makes it much easier to toggle something on or off with redstone, or based on another property of the train.
Remote Control
Remote Control You can remotely set properties on trains. Say your train is called train01, then you use the following on the sign:
Properties
The following properties can be set using both [cart] and [train]:
Property | Value example | Meaning |
---|---|---|
addtag |
tag1 |
Add a single tag |
settag |
taga |
Set to a single tag |
remtag | a | Remove a single tag |
addticket | expresstrain | Add a ticket that can be used for this train |
setticket | expresstrain | Set the train to only accept this ticket |
remticket | expresstrain | Remove a ticket so it can no longer be used for this train |
addowner |
Maxxue |
Add an owner to the train |
setowner |
Maxxue |
Clear all owners and set to this owner |
remowner | Maxxue | Remove a single owner from the train |
destination | station2 | Set the destination |
mobenter | false | Set if mobs can enter |
playerenter | true | Set if players can enter |
playerexit | yes | Set if players can exit |
playerenterexit playerexitenter |
yes | Sets both playerenter and playerexit at the same time to the same value. |
spawnitemdrops spawndrops killdrops |
true | Sets whether carts drop items when destroyed. When disabled, also disables contents of chest/hopper minecarts dropping. |
viewdistance | 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. |
The following properties can only be set using [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 |
false | Set if the train pushes mobs, players, trains and misc | |
true | Set if the train pushes mobs | |
no | Set if the train pushes players | |
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
/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.