Rails placed using the setblock command will only be oriented by the specified dataValue if there is already a rail at the specified coordinates. Otherwise, it will orient the rail such that it connects to adjacent rails, or if there are none, it will always place the north_south variant.
To reproduce, use this command in an open space:
/setblock ~1 ~ ~ minecraft:rail 9 replace
This will place a straight section of rail north/south. Without moving, use the command again, and the rail will change into the desired type: a curved section facing north/east.
If positioned so that the rail will be placed next to another rail, both rails will change shape in order to connect.
- is duplicated by
-
MC-53756 Placing rails with /fill or /setblock commands does not support data value
- Resolved
-
MC-65041 14w31a /setblock rail problem
- Resolved
-
MC-75899 using /clone on minecart tracks does not preserve orientation
- Resolved
-
MC-90251 Fill command issue
- Resolved
-
MC-122100 Rails don't clone right.
- Resolved
- relates to
-
MC-104231 Loading a custom structure doesn't load rails correctly
- Open
-
MC-31365 /summon and /setblock cannot specify chests, furnaces, dispensers, rails and droppers orientation
- Resolved
-
MC-89428 Rails update other rails before checking if they are in a valid location when moved by pistons
- Resolved