minecraft:rail_movement for you with a switch.Get GodCraftOverview
minecraft:rail_movement is an entity component: it goes in the components object of a custom mob, or in one of its component groups. Locks the entity to rails so it can only move along them, like a minecart.
Fields
| Field | Type | Default | Description |
|---|---|---|---|
max_speed | Decimal | "0.4" | Top speed the entity reaches on rails. |
Example
Inside the components object of BP/entities/<name>.json (values are the defaults or placeholders):
BP/entities/<name>.json
{
"minecraft:rail_movement": {
"max_speed": "0.4"
}
}