bergerhealer/TrainCarts

trains can "fly"

Closed this issue · 3 comments

Info
Please provide the following information:

  • BkCommonLib Version: Unsure, but most likely latest
  • TrainCarts Version: Last version before start of october
  • Server Type and Version: Paper, 1.18.2

Bug
Trains continue to move while in air when launch is high

Description
When using /launch and doing a large number such as 10000000 trains will contiue in the air forever even is the max speed is low

Expected behaviour
fall off after a certain distance

Actual behaviour
continue moving in the air without losing height

Steps to reproduce
(Max speed set to 50m/s) Place rails high up, use /train 1000000000000 in a minecart

reason is that it performs gravity calculations on the original velocity values. So with such a high velocity, the relative amount which goes towards the y-motion is very small. At the max speed calculations that disappears to near-0.

Probably could be fixed by taking maximum speed into account for gravity calculations, though that might break some existing coaster designs maybe? Idk

If this is about a scheduled "jump off" point, you could probably counter-act this by changing the gravity property to something high.

Closing issue, not a bug. If you want to eliminate the phenomenon, maybe adjust the speed/energy or adjust the gravity of the train.