-
Notifications
You must be signed in to change notification settings - Fork 0
Physics
Minor changes to off-rail minecart behaviour so high-speed carts survive gaps, slopes, and ice patches.
When a minecart leaves the rail with a mild downward velocity (Y velocity above -0.7), horizontal velocity is preserved. Vanilla applies a 5% drag per tick the moment the cart leaves the track, which erased momentum built up on a copper rail. Now the cart keeps its horizontal speed until it lands.
Carts falling faster than -0.7 (large drops) receive normal air drag.
Off-rail minecarts use the slipperiness of the block below them instead of a fixed 0.5 ground friction. Landing on ice preserves almost all the horizontal velocity; you can shoot a minecart off the end of a rail onto ice and keep going.
Vanilla clamps off-rail horizontal velocity at the current max speed (default game rule is 8). That capped aerial minecarts the same as grounded ones. The off-track clamp is now 40 blocks/sec, so a cart launched off a copper rail at tier speed does not get slowed mid-flight.
NewMinecartBehavior.calculateSlopeSpeed returns the unchanged velocity for MinecartFurnace instances. Furnace minecarts climb slopes without losing speed.
NewMinecartBehavior.getSlowdownFactor returns 0.975 for any cart with the train tag, regardless of whether it is ridden. Vanilla returns 0.997 when ridden vs 0.975 empty, which caused ridden/empty trailers in the same train to decay at different rates and stretch the chain.
NewMinecartBehavior.calculateHaltTrackSpeed is bypassed for any cart with the train tag. Unpowered powered rails normally scale velocity by 0.5; a train passing over a single unpowered powered rail would otherwise have its trailers braked mid-chain.
On every tick, carts in a train (furnace or train-tagged) reset their own fallDistance and that of their passengers to 0. Riders do not take fall damage when the train goes downhill.
- Rail-to-rail movement otherwise uses vanilla physics.
- The speed cap (game rule on regular rails, tier on copper rails) still applies.
- Collision and cart-to-cart pushing rules are vanilla except that furnace minecarts and
train-tagged carts are immune to push.
Start Here
Systems
Mechanics